jviereck / regjsparser

Parsing the JavaScript's RegExp in JavaScript.
http://www.julianviereck.de/regjsparser/
BSD 2-Clause "Simplified" License
79 stars 20 forks source link

fix: update IdentityEscape grammar #96

Closed JLHwung closed 5 years ago

JLHwung commented 5 years ago

Fixes #66

Update parseIdentityEscape to the following grammar

 IdentityEscape ::
      SourceCharacter but not c       
      [+U] SyntaxCharacter
      [+U] /
      [~U] SourceCharacterIdentityEscape[?N]

 SourceCharacterIdentityEscape[?N] ::
      [~N] SourceCharacter but not c
      [+N] SourceCharacter but not one of c or k
jviereck commented 5 years ago

Thanks a lot @JLHwung for picking up this old issue from #66 and making a contribution to this project!

There are a few minor comments. Let me know if you have any questions.

jviereck commented 5 years ago

Thanks for addressing the review and providing the additional test cases @JLHwung . This is good to go.