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

Make line indices configurable #117

Closed
wants to merge 1 commit into from
Closed

Conversation

dabbler0
Copy link

Allow the user to configure whether line indices are zero-based or one-based, like SpiderMonkey's Reflect.parse.

@RReverser
Copy link
Member

IMO it's pretty hard to standardize such things (de-facto they became so with Source Maps location format), and would be even harder if we start provide options for 0- or 1-based lines or columns on parser and tools levels. Also, I'm not sure if it's worth to include such simple yet rarely needed functionality on parser level since subtracting/adding of 1 is pretty simple operation to be done in any Acorn API consumer. Thoughts?

@marijnh
Copy link
Member

marijnh commented Sep 5, 2014

I agree with @RReverser here. Rather than trying to handle this option properly throughout Tern's sources, client code will just have to adapt the coordinates it gets from Tern into its own system.

@marijnh marijnh closed this Sep 5, 2014
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 this pull request may close these issues.

3 participants