graphql/language/lexer.py
def read_digits(source: Source, start, char) -> int:
    """Return the new position in the source after reading digits."""
    body = source.body
    position = start
    while char is not None and "0" <= char <= "9":
        position += 1
        char = char_at(body, position)
    if position == start:
        raise GraphQLSyntaxError(
            source,
            position,
            f"Invalid number, expected digit but got: {print_char(char)}.",
        )
    return position
Return the new position in the source after reading digits.
Return the new position in the source after reading digits.
Return the new position in the source after reading digits .
def read_digits(source: Source, start, char) -> int:
    body = source.body
    position = start
    while char is not None and "0" <= char <= "9":
        position += 1
        char = char_at(body, position)
    if position == start:
        raise GraphQLSyntaxError(
            source,
            position,
            f"Invalid number, expected digit but got: {print_char(char)}.",
        )
    return position
def read_digits ( source : Source , start , char ) -> int : body = source . body position = start while char is not None and "0" <= char <= "9" : position += 1 char = char_at ( body , position ) if position == start : raise GraphQLSyntaxError ( source , position , f"Invalid number, expected digit but got: {print_char(char)}." , ) return position
Return the new position in the source after reading digits.
Return the new position in the source after reading digits .
"""Return the new position in the source after reading digits."""
source
Source
start
char