Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unfinished long string literals generates valid ast #45

Closed
ghost opened this issue Feb 15, 2017 · 1 comment
Closed

Unfinished long string literals generates valid ast #45

ghost opened this issue Feb 15, 2017 · 1 comment
Labels
incorrect parsing Valid Lua code fails to parse, is parsed incorrectly, or invalid Lua code is accepted

Comments

@ghost
Copy link

ghost commented Feb 15, 2017

Test:

luaparse.parse('a = [====[]')

It generates valid ast, but should have thrown something like unfinished long string.

The long string literal value is also incorrect

console.log(
    luaparse.parse('a = [====[]').body[0].init[0].value // nothing.
  , luaparse.parse('a = [====[]]').body[0].init[0].value // ]
);
@fstirlitz
Copy link
Owner

Fixed in 07fbd6b.

@fstirlitz fstirlitz added the incorrect parsing Valid Lua code fails to parse, is parsed incorrectly, or invalid Lua code is accepted label Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incorrect parsing Valid Lua code fails to parse, is parsed incorrectly, or invalid Lua code is accepted
Projects
None yet
Development

No branches or pull requests

1 participant