---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/ok/create_operator.sql
---
SOURCE_FILE
  COMMENT "-- simple"
  WHITESPACE "\n"
  CREATE_OPERATOR
    CREATE_KW "create"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    OP
      R_ANGLE ">"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          FUNCTION_KW "function"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
      WHITESPACE "\n"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- procedure"
  WHITESPACE "\n"
  CREATE_OPERATOR
    CREATE_KW "create"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    OP
      CUSTOM_OP
        POUND "#"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          PROCEDURE_KW "procedure"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "p"
      WHITESPACE "\n"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- full"
  WHITESPACE "\n"
  CREATE_OPERATOR
    CREATE_KW "create"
    WHITESPACE " "
    OPERATOR_KW "operator"
    WHITESPACE " "
    OP
      PATH
        PATH
          PATH
            PATH_SEGMENT
              NAME_REF
                IDENT "foo"
          DOT "."
          PATH_SEGMENT
            NAME_REF
              IDENT "bar"
        DOT "."
        PATH_SEGMENT
      CUSTOM_OP
        R_ANGLE ">"
        R_ANGLE ">"
        MINUS "-"
        POUND "#"
    WHITESPACE " "
    ATTRIBUTE_LIST
      L_PAREN "("
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          FUNCTION_KW "function"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH
                PATH
                  PATH_SEGMENT
                    NAME_REF
                      IDENT "foo"
                DOT "."
                PATH_SEGMENT
                  NAME_REF
                    IDENT "bar"
              DOT "."
              PATH_SEGMENT
                NAME_REF
                  IDENT "f"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "leftarg"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          CHAR_TYPE
            VARCHAR_KW "varchar"
            ARG_LIST
              L_PAREN "("
              ARG
                LITERAL
                  INT_NUMBER "100"
              R_PAREN ")"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "rightarg"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH
                PATH_SEGMENT
                  NAME_REF
                    IDENT "foo"
              DOT "."
              PATH_SEGMENT
                NAME_REF
                  BIGINT_KW "bigint"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "commutator"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          CUSTOM_OP
            AMP "&"
            AMP "&"
            AMP "&"
            AMP "&"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "negator"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          CUSTOM_OP
            L_ANGLE "<"
            MINUS "-"
            R_ANGLE ">"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          RESTRICT_KW "restrict"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "r"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          JOIN_KW "join"
        WHITESPACE " "
        EQ "="
        WHITESPACE " "
        ATTRIBUTE_VALUE
          PATH_TYPE
            PATH
              PATH_SEGMENT
                NAME_REF
                  IDENT "j"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "hashes"
      COMMA ","
      WHITESPACE "\n  "
      ATTRIBUTE_OPTION
        NAME
          IDENT "merges"
      WHITESPACE "\n"
      R_PAREN ")"
  SEMICOLON ";"
  WHITESPACE "\n\n"
