oguimbal / pgsql-ast-parser

Yet another simple Postgres SQL parser
304 stars 43 forks source link

Nested comments #155

Open thgh opened 9 months ago

thgh commented 9 months ago

https://github.com/oguimbal/pgsql-ast-parser/blob/2c84d4ca6d566162c32ff8d0667c8e3bcd94a828/src/lexer.spec.ts#L241-L242

I was wondering about this test case. Shouldn't the lexer detect that as a syntax error?

/* /* */ /* /* */ */ */

Postgresql throws: syntax error at or near "*/"

Also notice that the github code highlighter doesn't expect nested comments.