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

Inconsistent Program.range with other parsers #8537

Open
fisker opened this issue Nov 19, 2020 · 0 comments
Open

Inconsistent Program.range with other parsers #8537

fisker opened this issue Nov 19, 2020 · 0 comments

Comments

@fisker
Copy link

fisker commented Nov 19, 2020

Flow version: 0.138.0

Expected behavior

When parsing " a ", other parsers like babel/espree(EDIT: espree has {start:0, end:3, range: [1,2]})/acorn returns Program.range equals to [0, 3]

Actual behavior

> require('flow-parser').parse(' a ').range
[ 1, 2 ]
  • Link to Try-Flow or Github repo: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants