---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/alter_operator_family.sql
---
SOURCE_FILE
  COMMENT "-- simple"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          OP
            L_ANGLE "<"
          WHITESPACE " "
          L_PAREN "("
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "t"
          COMMA ","
          WHITESPACE " "
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "u"
          R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- multi"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          OP
            CUSTOM_OP
              AMP "&"
              AMP "&"
          WHITESPACE " "
          L_PAREN "("
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "t"
          COMMA ","
          WHITESPACE " "
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "u"
          R_PAREN ")"
        COMMA ","
        WHITESPACE "\n  "
        OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          FUNCTION_SIG
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
        COMMA ","
        WHITESPACE "\n  "
        OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            R_PAREN ")"
          WHITESPACE " "
          FUNCTION_SIG
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
            PARAM_LIST
              L_PAREN "("
              PARAM
                PARAM_IN
                  IN_KW "in"
                WHITESPACE " "
                NAME
                  IDENT "a"
                WHITESPACE " "
                PATH_TYPE
                  PATH
                    PATH_SEGMENT
                      NAME_REF
                        TEXT_KW "text"
              R_PAREN ")"
        COMMA ","
        WHITESPACE "\n  "
        OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            COMMA ","
            WHITESPACE " "
            PARAM
              CHAR_TYPE
                VARCHAR_KW "varchar"
                ARG_LIST
                  L_PAREN "("
                  ARG
                    LITERAL
                      INT_NUMBER "100"
                  R_PAREN ")"
            R_PAREN ")"
          WHITESPACE " "
          FUNCTION_SIG
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- add_op_for_search"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          OP
            R_ANGLE ">"
          WHITESPACE " "
          L_PAREN "("
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "t"
          COMMA ","
          WHITESPACE " "
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "u"
          R_PAREN ")"
          WHITESPACE " "
          FOR_KW "for"
          WHITESPACE " "
          SEARCH_KW "search"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- add_op_for_order"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          OP
            R_ANGLE ">"
          WHITESPACE " "
          L_PAREN "("
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "t"
          COMMA ","
          WHITESPACE " "
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "u"
          R_PAREN ")"
          WHITESPACE " "
          FOR_KW "for"
          WHITESPACE " "
          ORDER_KW "order"
          WHITESPACE " "
          BY_KW "by"
          WHITESPACE " "
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "s"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- add_func"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          FUNCTION_SIG
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
            PARAM_LIST
              L_PAREN "("
              PARAM
                PATH_TYPE
                  PATH
                    PATH_SEGMENT
                      NAME_REF
                        IDENT "t"
              R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- add_func_with_params"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    ADD_OP_CLASS_OPTIONS
      ADD_KW "add"
      WHITESPACE "\n  "
      OPERATOR_CLASS_OPTION_LIST
        OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            COMMA ","
            WHITESPACE " "
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "u"
            R_PAREN ")"
          WHITESPACE " "
          FUNCTION_SIG
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
            PARAM_LIST
              L_PAREN "("
              PARAM
                PATH_TYPE
                  PATH
                    PATH_SEGMENT
                      NAME_REF
                        IDENT "a"
              COMMA ","
              WHITESPACE " "
              PARAM
                PATH_TYPE
                  PATH
                    PATH_SEGMENT
                      NAME_REF
                        IDENT "b"
              R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_op"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    DROP_OP_CLASS_OPTIONS
      DROP_KW "drop"
      WHITESPACE "\n  "
      DROP_OP_CLASS_OPTION_LIST
        DROP_OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            COMMA ","
            WHITESPACE " "
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "u"
            R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_op_single_param"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    DROP_OP_CLASS_OPTIONS
      DROP_KW "drop"
      WHITESPACE "\n  "
      DROP_OP_CLASS_OPTION_LIST
        DROP_OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_func"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    DROP_OP_CLASS_OPTIONS
      DROP_KW "drop"
      WHITESPACE "\n  "
      DROP_OP_CLASS_OPTION_LIST
        DROP_OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            COMMA ","
            WHITESPACE " "
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "u"
            R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_func_single_param"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    DROP_OP_CLASS_OPTIONS
      DROP_KW "drop"
      WHITESPACE "\n  "
      DROP_OP_CLASS_OPTION_LIST
        DROP_OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- drop_multiple"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE " "
    DROP_OP_CLASS_OPTIONS
      DROP_KW "drop"
      WHITESPACE "\n  "
      DROP_OP_CLASS_OPTION_LIST
        DROP_OP_CLASS_OPTION
          OPERATOR_KW "operator"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "1"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            COMMA ","
            WHITESPACE " "
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "u"
            R_PAREN ")"
        COMMA ","
        WHITESPACE "\n  "
        DROP_OP_CLASS_OPTION
          FUNCTION_KW "function"
          WHITESPACE " "
          LITERAL
            INT_NUMBER "2"
          WHITESPACE " "
          PARAM_LIST
            L_PAREN "("
            PARAM
              PATH_TYPE
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "t"
            R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- rename"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE "\n  "
    RENAME_TO
      RENAME_KW "rename"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      NAME
        IDENT "n"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- owner"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE "\n  "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        NAME_REF
          IDENT "u"
  SEMICOLON ";"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE "\n  "
    OWNER_TO
      OWNER_KW "owner"
      WHITESPACE " "
      TO_KW "to"
      WHITESPACE " "
      ROLE_REF
        CURRENT_USER_KW "current_user"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- schema"
  WHITESPACE "\n"
  ALTER_OPERATOR_FAMILY
    ALTER_KW "alter"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    FAMILY_KW "family"
    WHITESPACE " "
    PATH
      PATH
        PATH_SEGMENT
          NAME_REF
            IDENT "foo"
      DOT "."
      PATH_SEGMENT
        NAME_REF
          IDENT "f"
    WHITESPACE " "
    USING_KW "using"
    WHITESPACE " "
    NAME_REF
      IDENT "i"
    WHITESPACE "\n  "
    SET_SCHEMA
      SET_KW "set"
      WHITESPACE " "
      SCHEMA_KW "schema"
      WHITESPACE " "
      NAME_REF
        IDENT "s"
  SEMICOLON ";"
  WHITESPACE "\n\n"
