---
source: crates/squawk_parser/tests/tests.rs
input_file: crates/squawk_parser/tests/data/err/insert.sql
---
SOURCE_FILE
  COMMENT "-- missing comma in column list"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "b"
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "c"
      R_PAREN ")"
    WHITESPACE "\n  "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "2"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "3"
          R_PAREN ")"
    WHITESPACE "\n  "
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- missing column in column list & trailing comma"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      COMMA ","
      ERROR
        COMMA ","
      COLUMN
        NAME_REF
          IDENT "c"
      ERROR
        COMMA ","
      R_PAREN ")"
    WHITESPACE "\n  "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "1"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "2"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "3"
          R_PAREN ")"
    WHITESPACE "\n  "
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n\n"
  COMMENT "-- missing comma in values & trailing comma"
  WHITESPACE "\n"
  INSERT
    INSERT_KW "insert"
    WHITESPACE " "
    INTO_KW "into"
    WHITESPACE " "
    PATH
      PATH_SEGMENT
        NAME_REF
          IDENT "t"
    WHITESPACE " "
    COLUMN_LIST
      L_PAREN "("
      COLUMN
        NAME_REF
          IDENT "a"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "b"
      COMMA ","
      WHITESPACE " "
      COLUMN
        NAME_REF
          IDENT "c"
      R_PAREN ")"
    WHITESPACE "\n  "
    VALUES
      VALUES_KW "values"
      WHITESPACE " "
      ROW_LIST
        ROW
          L_PAREN "("
          LITERAL
            INT_NUMBER "4"
          COMMA ","
          WHITESPACE " "
          LITERAL
            INT_NUMBER "5"
          WHITESPACE "  "
          LITERAL
            INT_NUMBER "6"
          ERROR
            COMMA ","
          R_PAREN ")"
    WHITESPACE "\n  "
    ON_CONFLICT_CLAUSE
      ON_KW "on"
      WHITESPACE " "
      CONFLICT_KW "conflict"
      WHITESPACE " "
      CONFLICT_DO_NOTHING
        DO_KW "do"
        WHITESPACE " "
        NOTHING_KW "nothing"
  SEMICOLON ";"
  WHITESPACE "\n"
---
error[syntax-error]: expected COMMA
  ╭▸ 
2 │ insert into t (a, b c)
  ╰╴                   ━
error[syntax-error]: missing column
  ╭▸ 
7 │ insert into t (a,,c,)
  ╰╴                 ━
error[syntax-error]: unexpected trailing comma
  ╭▸ 
7 │ insert into t (a,,c,)
  ╰╴                   ━
error[syntax-error]: expected COMMA
   ╭▸ 
13 │   values (4, 5  6,)
   ╰╴              ━
error[syntax-error]: unexpected trailing comma
   ╭▸ 
13 │   values (4, 5  6,)
   ╰╴                 ━
