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

Implement TC39 JSON-Superset proposal #51

Open
FreeMasen opened this issue Sep 16, 2019 · 1 comment
Open

Implement TC39 JSON-Superset proposal #51

FreeMasen opened this issue Sep 16, 2019 · 1 comment
Labels
good first issue Good for newcomers TC39 Proposal Stage 2 or greater proposal at TC39

Comments

@FreeMasen
Copy link
Collaborator

FreeMasen commented Sep 16, 2019

Allow line separator and paragraph separator in string literals.

proposal

@FreeMasen FreeMasen added make good first issue Could be a good first issue if more details were provided TC39 Proposal Stage 2 or greater proposal at TC39 labels Sep 16, 2019
@FreeMasen
Copy link
Collaborator Author

The changes to allow for these new characters need to be made in the tokenizer's string method.

Currently there is a check for "is_new_line_not_cr" that will need to be updated to only check for '\n' as the other two characters in that method are now allowed with the JSON superset proposal.

A good test for this would include the following strings:

"\"line\u{2028}seperator\""
"'paragraph\u{2029}seperator'"

The test should correctly evaluate these to the appropriate RawToken and after parsing each the buffer should be empty. A good reference for this is the tokenizer_strings test in the same module.

@FreeMasen FreeMasen added good first issue Good for newcomers and removed make good first issue Could be a good first issue if more details were provided labels Nov 6, 2019
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 TC39 Proposal Stage 2 or greater proposal at TC39
Projects
None yet
Development

No branches or pull requests

1 participant