-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
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
Regression in 5.1.1 related to template literals #575
Comments
shnhrrsn
added a commit
to grindjs/stone
that referenced
this issue
Jul 26, 2017
I have the same issue. Repro steps
const acorn = require("acorn")
const code = `
\`\${ foo({class: 1}) }\`
`
console.log(acorn.version)
console.log(code)
console.log(acorn.parse(code, {ecmaVersion: 8})) Expected result
Actual result
|
mysticatea
added a commit
to mysticatea/acorn
that referenced
this issue
Sep 16, 2017
This was referenced Nov 16, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing an issue in 5.1.1 that’s not present prior (tested 5.0.3 and 5.1.0).
Here’s my how I’m testing:
sample.js:
test.js:
Running this in both Node 8.2 and through
acorn.parse
in 5.0.3 and 5.1.0 works fine. Trying to parse it in 5.1.1 yields the following:It appears to be the
class
key, if I quote it it works fine. Interestingly, if I keep the sameJSON.stringify
block of code without template literals, acorn parses it just fine.The text was updated successfully, but these errors were encountered: