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

Wrong 'ExpressionStatement.directive' #130

Closed
fisker opened this issue Oct 27, 2020 · 1 comment
Closed

Wrong 'ExpressionStatement.directive' #130

fisker opened this issue Oct 27, 2020 · 1 comment

Comments

@fisker
Copy link
Collaborator

fisker commented Oct 27, 2020

require('meriyah').parse('"a"\n"b"', {directives:true}).body
[
  {
    type: 'ExpressionStatement',
    expression: { type: 'Literal', value: 'a', raw: '"a"' },
    directive: 'b'
  },
  {
    type: 'ExpressionStatement',
    expression: { type: 'Literal', value: 'b', raw: '"b"' },
    directive: 'b'
  }
]

First one should be b

@3cp
Copy link
Member

3cp commented Oct 27, 2020

Excellent edge case.

@3cp 3cp closed this as completed in 9504b6a Oct 27, 2020
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