graphql/language/lexer.py
def char2hex(a):
    """Convert a hex character to its integer value.

    '0' becomes 0, '9' becomes 9
    'A' becomes 10, 'F' becomes 15
    'a' becomes 10, 'f' becomes 15

    Returns -1 on error.

    """
    if "0" <= a <= "9":
        return ord(a) - 48
    elif "A" <= a <= "F":
        return ord(a) - 55
    elif "a" <= a <= "f":  # a-f
        return ord(a) - 87
    return -1
Convert a hex character to its integer value.

    '0' becomes 0, '9' becomes 9
    'A' becomes 10, 'F' becomes 15
    'a' becomes 10, 'f' becomes 15

    Returns -1 on error.

    
Convert a hex character to its integer value.

1 on error.
Convert a hex character to its integer value . 1 on error .
def char2hex(a):
    if "0" <= a <= "9":
        return ord(a) - 48
    elif "A" <= a <= "F":
        return ord(a) - 55
    elif "a" <= a <= "f":  
        return ord(a) - 87
    return -1
def char2hex ( a ) : if "0" <= a <= "9" : return ord ( a ) - 48 elif "A" <= a <= "F" : return ord ( a ) - 55 elif "a" <= a <= "f" : return ord ( a ) - 87 return - 1
Convert a hex character to its integer value.
Convert a hex character to its integer value .
"""Convert a hex character to its integer value.

    '0' becomes 0, '9' becomes 9
    'A' becomes 10, 'F' becomes 15
    'a' becomes 10, 'f' becomes 15

    Returns -1 on error.

    """ # a-f
a