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

Can't parse top-level-await in call arguments #212

Closed
fisker opened this issue Mar 30, 2022 · 1 comment · Fixed by #213
Closed

Can't parse top-level-await in call arguments #212

fisker opened this issue Mar 30, 2022 · 1 comment · Fixed by #213
Assignees

Comments

@fisker
Copy link
Collaborator

fisker commented Mar 30, 2022

> require('meriyah').version
'4.2.0'
> require('meriyah').parseModule('await 1')
{
  type: 'Program',
  sourceType: 'module',
  body: [ { type: 'ExpressionStatement', expression: [Object] } ]
}
> require('meriyah').parseModule('foo(await 1)')
Uncaught [ParseError [SyntaxError]: [1:9]: Await is only valid in async functions
] {
  index: 9,
  line: 1,
  column: 9,
  description: '[1:9]: Await is only valid in async functions',
  loc: { line: 1, column: 9 }
}
@fisker fisker changed the title Can't parse top-level-await in function call Can't parse top-level-await in call arguments Mar 30, 2022
@3cp 3cp self-assigned this Mar 30, 2022
3cp added a commit that referenced this issue Mar 31, 2022
Such as foo[await 1], foo(await 1).

closes #212
3cp added a commit that referenced this issue Mar 31, 2022
Such as foo[await 1], foo(await 1).

closes #212
@3cp 3cp closed this as completed in #213 Mar 31, 2022
@3cp
Copy link
Member

3cp commented Mar 31, 2022

Released v4.2.1.

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

Successfully merging a pull request may close this issue.

2 participants