graphql/language/lexer.py
def read_token(self, prev: Token) -> Token:
        """Get the next token from the source starting at the given position.

        This skips over whitespace until it finds the next lexable token, then lexes
        punctuators immediately or calls the appropriate helper function for more
        complicated tokens.
        """
        source = self.source
        body = source.body
        body_length = len(body)

        pos = self.position_after_whitespace(body, prev.end)
        line = self.line
        col = 1 + pos - self.line_start

        if pos >= body_length:
            return Token(TokenKind.EOF, body_length, body_length, line, col, prev)

        char = char_at(body, pos)
        if char is not None:
            kind = _KIND_FOR_PUNCT.get(char)
            if kind:
                return Token(kind, pos, pos + 1, line, col, prev)
            if char == "#":
                return read_comment(source, pos, line, col, prev)
            elif char == ".":
                if char == char_at(body, pos + 1) == char_at(body, pos + 2):
                    return Token(TokenKind.SPREAD, pos, pos + 3, line, col, prev)
            elif "A" <= char <= "Z" or "a" <= char <= "z" or char == "_":
                return read_name(source, pos, line, col, prev)
            elif "0" <= char <= "9" or char == "-":
                return read_number(source, pos, char, line, col, prev)
            elif char == '"':
                if char == char_at(body, pos + 1) == char_at(body, pos + 2):
                    return read_block_string(source, pos, line, col, prev)
                return read_string(source, pos, line, col, prev)

        raise GraphQLSyntaxError(source, pos, unexpected_character_message(char))
Get the next token from the source starting at the given position.

        This skips over whitespace until it finds the next lexable token, then lexes
        punctuators immediately or calls the appropriate helper function for more
        complicated tokens.
        
Get the next token from the source starting at the given position.
This skips over whitespace until it finds the next lexable token, then lexes
punctuators immediately or calls the appropriate helper function for more
complicated tokens.
Get the next token from the source starting at the given position . This skips over whitespace until it finds the next lexable token then lexes punctuators immediately or calls the appropriate helper function for more complicated tokens .
def read_token(self, prev: Token) -> Token:
        source = self.source
        body = source.body
        body_length = len(body)
        pos = self.position_after_whitespace(body, prev.end)
        line = self.line
        col = 1 + pos - self.line_start
        if pos >= body_length:
            return Token(TokenKind.EOF, body_length, body_length, line, col, prev)
        char = char_at(body, pos)
        if char is not None:
            kind = _KIND_FOR_PUNCT.get(char)
            if kind:
                return Token(kind, pos, pos + 1, line, col, prev)
            if char == "#":
                return read_comment(source, pos, line, col, prev)
            elif char == ".":
                if char == char_at(body, pos + 1) == char_at(body, pos + 2):
                    return Token(TokenKind.SPREAD, pos, pos + 3, line, col, prev)
            elif "A" <= char <= "Z" or "a" <= char <= "z" or char == "_":
                return read_name(source, pos, line, col, prev)
            elif "0" <= char <= "9" or char == "-":
                return read_number(source, pos, char, line, col, prev)
            elif char == '"':
                if char == char_at(body, pos + 1) == char_at(body, pos + 2):
                    return read_block_string(source, pos, line, col, prev)
                return read_string(source, pos, line, col, prev)
        raise GraphQLSyntaxError(source, pos, unexpected_character_message(char))
def read_token ( self , prev : Token ) -> Token : source = self . source body = source . body body_length = len ( body ) pos = self . position_after_whitespace ( body , prev . end ) line = self . line col = 1 + pos - self . line_start if pos >= body_length : return Token ( TokenKind . EOF , body_length , body_length , line , col , prev ) char = char_at ( body , pos ) if char is not None : kind = _KIND_FOR_PUNCT . get ( char ) if kind : return Token ( kind , pos , pos + 1 , line , col , prev ) if char == "#" : return read_comment ( source , pos , line , col , prev ) elif char == "." : if char == char_at ( body , pos + 1 ) == char_at ( body , pos + 2 ) : return Token ( TokenKind . SPREAD , pos , pos + 3 , line , col , prev ) elif "A" <= char <= "Z" or "a" <= char <= "z" or char == "_" : return read_name ( source , pos , line , col , prev ) elif "0" <= char <= "9" or char == "-" : return read_number ( source , pos , char , line , col , prev ) elif char == '"' : if char == char_at ( body , pos + 1 ) == char_at ( body , pos + 2 ) : return read_block_string ( source , pos , line , col , prev ) return read_string ( source , pos , line , col , prev ) raise GraphQLSyntaxError ( source , pos , unexpected_character_message ( char ) )
Get the next token from the source starting at the given position.
Get the next token from the source starting at the given position .
"""Get the next token from the source starting at the given position.

        This skips over whitespace until it finds the next lexable token, then lexes
        punctuators immediately or calls the appropriate helper function for more
        complicated tokens.
        """
self
prev
Token