gwenn / lemon-rs

LALR(1) parser generator for Rust based on Lemon + SQL parser
The Unlicense
48 stars 10 forks source link

Remove assert that is triggered for trailing semicolons #35

Closed honzasp closed 1 year ago

honzasp commented 1 year ago

SQL string can contain empty statements, which should be ignored. They were correctly handled in the middle of a sequence of statements, but an empty statement at the end of the SQL string (such as SELECT 1;; or ;) triggered an assert.

I don't know this code in depth, so I'm not 100% sure that removing this assert is harmless. I'm happy to rework the PR if the correct solution is different.

gwenn commented 1 year ago

Looks good to me. I will try to find if there is an equivalent assert in SQLite code.

gwenn commented 1 year ago

Thanks.