(self)
return word
Read a string literal.
Read a string literal.
Read a string literal .
def read_string(self):
        """Read a string literal."""
        word = self.read(1)
        if not word or word != b'"':
            self.seek(-len(word), 1)
            return b''
        # while tokenised numbers inside a string literal will be printed as tokenised numbers,
        # they don't actually execute as such:
        # a \00 character, even if inside a tokenised number, will break a string literal
        # and make the parser expect a line number afterwards, etc. We follow this.
        word += self.read_to((b'"',) + self.end_line)
        delim = self.read(1)
        if delim == b'"':
            word += delim
        else:
            self.seek(-len(delim), 1)
        return word
def read_string ( self ) : word = self . read ( 1 ) if not word or word != b'"' : self . seek ( - len ( word ) , 1 ) return b'' # while tokenised numbers inside a string literal will be printed as tokenised numbers, # they don't actually execute as such: # a \00 character, even if inside a tokenised number, will break a string literal # and make the parser expect a line number afterwards, etc. We follow this. word += self . read_to ( ( b'"' , ) + self . end_line ) delim = self . read ( 1 ) if delim == b'"' : word += delim else : self . seek ( - len ( delim ) , 1 ) return word