-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Range information is inconsistent for Program nodes with leading whitespace #349
Comments
Ah I didn't originally see this issue, but see mine in (Was auto-migrated to) babel/babel#6681 |
@not-an-aardvark Is this still an issue? |
Is this going to get fixed? |
@fisker can you confirm that this is still an issue? |
Yes, I'm sure, I found this during working on Prettier, |
|
This is already marked as accepted, so any volunteers? 😄 |
I am working on this. This should probably be a breaking change. |
Output
The
Program
node hasstart: 0
andend: 23
, but itsrange
is[10, 13]
.This happens because espree transforms the
range
property to match Esprima's behavior. The transformation is correct, but we should also update thestart
andend
properties, since they're equivalent in all other cases.The text was updated successfully, but these errors were encountered: