pgsql-ast-parser icon indicating copy to clipboard operation
pgsql-ast-parser copied to clipboard

`ALTER TYPE` statements fail to parse

Open valeneiko opened this issue 3 years ago • 0 comments

Parsing:

ALTER TYPE foo ADD VALUE 'bar';

Fails with:

Error: Syntax error at line 1 col 12:

  ALTER TYPE foo
             ^
Unexpected word token: "foo". I did not expect any more input. Here is the state of my parse table:

    kw_sequence → %word ● 

    at Parser.feed (/src/node_modules/nearley/lib/nearley.js:343:27)
    at _parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:110:16)
    at doParse (/src/node_modules/pgsql-ast-parser/src/parser.ts:57:27)
    at Object.parse (/src/node_modules/pgsql-ast-parser/src/parser.ts:60:11)

valeneiko avatar Jun 29 '22 11:06 valeneiko