Open
Description
Consider these two inputs:
void {
x: []
} / "/ //" /*
/*/
module.exports.foo = 2;
// */
{
x: []
} / "/ //" /*
/*/
module.exports.foo = 2;
// */
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 😅)
Activity