Skip to content
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

Parser crash on async functions #3

Closed
dotcypress opened this issue Jun 15, 2016 · 2 comments
Closed

Parser crash on async functions #3

dotcypress opened this issue Jun 15, 2016 · 2 comments

Comments

@dotcypress
Copy link

Example:

const noop = async () => undefined
{ Error: Line 1: Unexpected token =>
    at throwError (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:2070:17)
    at throwUnexpected (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:2133:5)
    at consumeSemicolon (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:2214:9)
    at parseConstLetDeclaration (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:3730:5)
    at parseSourceElement (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:5178:28)
    at parseSourceElements (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:5220:25)
    at parseProgram (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:5240:12)
    at Object.parse (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/node_modules/espree/espree.js:5483:19)
    at Object.parse (/usr/local/lib/node_modules/standard-format/node_modules/rocambole/rocambole.js:69:31)
    at Object.exports.stringBefore (/usr/local/lib/node_modules/standard-format/node_modules/esformatter-semicolon-first/esformatter-semicolon-first.js:39:23)
  index: 48,
  lineNumber: 1,
  column: 23,
  description: 'Unexpected token =>' }
@dotcypress dotcypress changed the title Parse crash on async arrow functions Parser crash on async arrow functions Jun 15, 2016
@dotcypress dotcypress changed the title Parser crash on async arrow functions Parser crash on async functions Jun 15, 2016
@dotcypress
Copy link
Author

dotcypress commented Jun 15, 2016

Waiting for espree

@millermedeiros
Copy link
Owner

Should be easy to fix, just need to replace espree with https://github.com/millermedeiros/esformatter-parser

Pull requests are highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants