#NEWLINE# def _ConsumeSingleByteString( self ) : #NEWLINE# #INDENT# 'Consume one token of a string literal.\n\n    String literals (whether bytes or text) can come in multiple adjacent\n    tokens which are automatically concatenated, like in C or Python.  This\n    method only consumes one token.\n\n    Raises:\n      ParseError: When the wrong format data is found.\n    ' #NEWLINE# text = self . token #NEWLINE# if ( ( len ( text ) < 1 ) or ( text [ 0 ] not in ( "'" , '"' ) ) ) : #NEWLINE# #INDENT# raise self . _ParseError ( ( 'Expected string but found: %r' % ( text , ) ) ) #NEWLINE# #UNINDENT# if ( ( len ( text ) < 2 ) or ( text [ ( - 1 ) ] != text [ 0 ] ) ) : #NEWLINE# #INDENT# raise self . _ParseError ( ( 'String missing ending quote: %r' % ( text , ) ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# result = text_encoding . CUnescape ( text [ 1 : ( - 1 ) ] ) #NEWLINE# #UNINDENT# except ValueError as e : #NEWLINE# #INDENT# raise self . _ParseError ( str ( e ) ) #NEWLINE# #UNINDENT# self . NextToken ( ) #NEWLINE# return result