Skip to content

Reject identifier or keyword immediately following a numeric literal #1662

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

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Feb 3, 2021

Rejects invalid code like 1u8, just like TS would, by complaining about an identifier or keyword immediately following a numeric literal, during parsing.

Does not yet account for a BigInt literal's n postfix, since BigInts are not yet supported anyway. Other than that there may still be more to do here, like rejecting 1 2 or a b complaining about a missing ; as TS would, but seems less urgent and is unrelated.

fixes #1637

  • I've read the contributing guidelines

@dcodeIO dcodeIO requested a review from MaxGraey February 3, 2021 16:08
@dcodeIO
Copy link
Member Author

dcodeIO commented Feb 3, 2021

Pushed a fix for pos + 1 to the branch, but doesn't update for some reason. Perhaps a problem with GH.

@dcodeIO dcodeIO merged commit 7a46aa9 into master Feb 3, 2021
@dcodeIO dcodeIO deleted the issue-1637 branch June 1, 2021 15:20
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.

Compiler hangs on returning postfixed number literal from a function with mismatching types
2 participants