def unexpected(lexer: Lexer, at_token: Token = None) -> GraphQLError:
    """Create an error when an unexpected lexed token is encountered."""
    token = at_token or lexer.token
    return GraphQLSyntaxError(lexer.source, token.start, f"Unexpected {token.desc}")