Closed GraphR00t closed 8 months ago
Unfortunately, this is not a bug but a peculiarity of the ECMAScript specification. The lexer cannot parse a JS file in a valid way, only a parser can. The problem is that RegExp literals depend on the parsing context whether it is expected or not. There is a bit of information here: https://github.com/tdewolff/parse/tree/master/js. Basically, you need to know if a /
or /=
operator is allowed at the position, if it is not you need to re-lex the same token as a RegExp.
Thank you for that precision.
The '#' character causes issues when it is inside a regular expression literal.
I use the version v2.7.12.