You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the first one it's an object divided by the string "/ //", followed by a comment and by the expression module.exports.foo = 2;.
In the second one it's a block containing a labeled statement (x: []), then there is a regular expression (/ "/), and inline comment and a block comment.
However, it returns exports: [ 'foo' ] for both the examples.
(Sorry for those /*//// */ patterns, but I need them to write "dual mode" code to toggle between code and comments 😅)
The text was updated successfully, but these errors were encountered:
When it comes down to it, these are all cases that require deeper parsing context to properly manage. That is, you have found the places where the heuristic approach breaks down!
I get the feeling these are the limits of a small lexer though unfortunately.
If specific cases come up with regards to real world code we can fix them individually though.
The opt out at least is not getting any detection of course.
Consider these two inputs:
In the first one it's an object divided by the string
"/ //"
, followed by a comment and by the expressionmodule.exports.foo = 2;
.In the second one it's a block containing a labeled statement (
x: []
), then there is a regular expression (/ "/
), and inline comment and a block comment.However, it returns
exports: [ 'foo' ]
for both the examples.(Sorry for those
/*/
/// */
patterns, but I need them to write "dual mode" code to toggle between code and comments 😅)The text was updated successfully, but these errors were encountered: