#NEWLINE# def _parse_collection( self , content ) : #NEWLINE# #INDENT# '\n            Consume an array of values.\n            :param content str The input to consume\n            :return: list The collected array and any remaining content.\n        ' #NEWLINE# collection = [ ] #NEWLINE# while ( len ( content ) != 0 ) : #NEWLINE# #INDENT# c = content [ 0 ] #NEWLINE# if ( c == ',' ) : #NEWLINE# #INDENT# content = content [ 1 : ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( c == ']' ) : #NEWLINE# #INDENT# content = collection [ 1 : ] #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# chunk = self . _parse_value ( content ) #NEWLINE# collection . append ( chunk [ 0 ] ) #NEWLINE# content = chunk [ 1 ] #NEWLINE# #UNINDENT# return [ collection , content ]