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

"illegal instruction" crash #53

Closed
Frank-Buss opened this issue Oct 3, 2020 · 2 comments
Closed

"illegal instruction" crash #53

Frank-Buss opened this issue Oct 3, 2020 · 2 comments
Labels
good first issue Good for newcomers and C++ beginners

Comments

@Frank-Buss
Copy link
Contributor

This code:

let i = "test
";

results in this output on my system:

/home/frank/tmp/test.js:1:9: error: unclosed string literal
/home/frank/tmp/test.js:2:1: error: unclosed string literal
../src/parse.cpp:563: fatal: token not implemented in parse_expression_remainder: string on line 2 column 1
Illegal instruction

Looks like the program crashed with an "illegal instruction".

@strager strager added the good first issue Good for newcomers and C++ beginners label Oct 8, 2020
@strager
Copy link
Collaborator

strager commented Oct 8, 2020

I think fixing the crash is a matter of telling parse_expression_remainder to stop parsing when it sees a string literal (instead of an operator).

Producing good error messages is another matter; we can punt on that for now.

@strager
Copy link
Collaborator

strager commented Feb 21, 2021

As of commit b9e4851, the code is parsing without a crash:

hello.js:1:9: error: unclosed string literal [E040]

@strager strager closed this as completed Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers and C++ beginners
Projects
None yet
Development

No branches or pull requests

2 participants