#NEWLINE# @ staticmethod #NEWLINE# def _parse_string( content ) : #NEWLINE# #INDENT# '\n          Consume a string.\n            :param content str The input to consume\n            :return: list The collected string and any remaining content.\n        ' #NEWLINE# length = len ( content ) #NEWLINE# collected = '' #NEWLINE# i = 0 #NEWLINE# while ( i < length ) : #NEWLINE# #INDENT# c = content [ i ] #NEWLINE# if ( c == '\\' ) : #NEWLINE# #INDENT# i += 1 #NEWLINE# collected += content [ i ] #NEWLINE# i += 1 #NEWLINE# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( c == '"' ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# i += 1 #NEWLINE# collected += c #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return [ collected , content [ ( i + 1 ) : ] ]