We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider this non-strict mode code: (GitHub's syntax highlighting is broken)
function fn() { yield / "/ //" /* } /*/ } module.exports.foo = 2; // */
The tokens are:
[function] [Identifier: fn] [paren left] [paren left] [brace left] [Identifier: yield] [division] [String: "/ //"] [Comment: \n}\n/ ] [brace right] [Identifier: module] [dot] [Identifier: exports] [dot] [Identifier: foo] [equal] [Number: 2] [semicolon]
However, cjs-module-lexer returns { exports: [], reexports: [] }.
cjs-module-lexer
{ exports: [], reexports: [] }
The text was updated successfully, but these errors were encountered:
Improving the lexing ambiguity cases is always a goal so thanks for posting, but yes there isn't a rush to fix this :)
I wasn't aware the this would be parsed as division in this expression position... what is it that makes yield act differently to return here?
yield
return
Sorry, something went wrong.
I've posted a potential fix in #21, interestingly it's a negative diff and thankfully doesn't require any extra work :)
Would be grateful if you could review when you can.
break
continue
No branches or pull requests
Consider this non-strict mode code: (GitHub's syntax highlighting is broken)
The tokens are:
However,
cjs-module-lexer
returns{ exports: [], reexports: [] }
.The text was updated successfully, but these errors were encountered: