oguimbal/pgsql-ast-parser

`COMMENT` statements fail to parse

Opened this issue · 0 comments

Parsing:

COMMENT ON FUNCTION foobar IS 'my comment';

Fails with:

Error: Syntax error at line 1 col 21:

  COMMENT ON FUNCTION foobar
                      ^
Unexpected word token: "foobar". I did not expect any more input. Here is the state of my parse table:

    kw_materialized  %word  
    comment_what_nm$subexpression$1  %word  
    kw_column  %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)