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

Syntax error when using Unicode escape sequence with curly brackets in a string #827

Closed
jevancc opened this issue Oct 8, 2020 · 2 comments · Fixed by #959
Closed

Syntax error when using Unicode escape sequence with curly brackets in a string #827

jevancc opened this issue Oct 8, 2020 · 2 comments · Fixed by #959
Labels
bug Something isn't working lexer Issues surrounding the lexer
Milestone

Comments

@jevancc
Copy link
Contributor

jevancc commented Oct 8, 2020

Describe the bug
The behavior of Unicode code point escape (Unicode escape with curly brackets) is different from the spec.

To Reproduce

"\u{AA}"       // syntax error, should pass
"\u{{AA}}"     // pass, should throw syntax error
"\u{{AA}"      // freeze, should throw syntax error
"\u{AA}}"      // freeze, should pass

Expected behavior
The string should be tokenized and handled correctly. The expected behavior can be found in MDN.
Some lexer tests should also be updated.

Build environment (please complete the following information):

  • OS: Windows 10
  • Version: OS Build 190941.508
  • Target triple: x86_64-pc-windows-msvc
  • Rustc version: rustc 1.49.0-nightly (91a79fb29 2020-10-07)

Additional context
It should be bugs in string.rs and cursor.rs.

@jevancc jevancc added the bug Something isn't working label Oct 8, 2020
@Razican
Copy link
Member

Razican commented Oct 9, 2020

Hi! Is this solved by #826?

@jevancc
Copy link
Contributor Author

jevancc commented Oct 9, 2020

Hi! Is this solved by #826?

No, it's not. Seems to be an independent bug in string.rs so I created this issue for it :)

@Razican Razican added the lexer Issues surrounding the lexer label Oct 9, 2020
@Razican Razican added this to the v0.11.0 milestone Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lexer Issues surrounding the lexer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants