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

Handle line terminators appropriately in our parser #10

Merged
merged 4 commits into from
Apr 17, 2024

Conversation

PrestonLTaylor
Copy link
Owner

No description provided.

This would cause "Press any key to exit." to be printed on the same line
as the completion before this commit
We would be unable to parse anything past the first line of a JavaScript
file as we would do nothing with line terminators.

We now always ignore line terminators when consuming tokens.
The spec says that a line terminator isn't allowed before a throw
expression.

As the expression is required, we throw a syntax error with an
appropriate error message.
The spec says that there if there is a line terminator after a return
that means an expression shouldn't be parsed.
@PrestonLTaylor PrestonLTaylor merged commit a3a60e6 into master Apr 17, 2024
2 checks passed
@PrestonLTaylor PrestonLTaylor deleted the line-terminator-fix branch April 17, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant