def parse_union_type_extension(lexer: Lexer) -> UnionTypeExtensionNode:
    """UnionTypeExtension"""
    start = lexer.token
    expect_keyword(lexer, "extend")
    expect_keyword(lexer, "union")
    name = parse_name(lexer)
    directives = parse_directives(lexer, True)
    types = parse_union_member_types(lexer)
    if not (directives or types):
        raise unexpected(lexer)
    return UnionTypeExtensionNode(
        name=name, directives=directives, types=types, loc=loc(lexer, start)
    )
def parse_union_type_extension ( lexer : Lexer ) -> UnionTypeExtensionNode : start = lexer . token expect_keyword ( lexer , "extend" ) expect_keyword ( lexer , "union" ) name = parse_name ( lexer ) directives = parse_directives ( lexer , True ) types = parse_union_member_types ( lexer ) if not ( directives or types ) : raise unexpected ( lexer ) return UnionTypeExtensionNode ( name = name , directives = directives , types = types , loc = loc ( lexer , start ) )
UnionTypeExtension