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

Firefox, Safari, and Chrome all use 1-based column numbers -- estree should too #65

Closed
fitzgen opened this issue Mar 16, 2015 · 6 comments

Comments

@fitzgen
Copy link

fitzgen commented Mar 16, 2015

Or somehow convince everyone else to use 0-based columns (if it doesn't break the web).

@dherman
Copy link

dherman commented Mar 16, 2015

I am pretty confident changing error stack indices would break the web.

@nzakas
Copy link
Contributor

nzakas commented Mar 16, 2015

👎 If such compatibility is an issue, it can be handled downstream by tools.

@RReverser
Copy link
Member

@nzakas 👍 I don't see reasons to break established logic and tools that rely on it.

@mikesherov
Copy link
Contributor

@fitzgen thanks for contributing! We can't break the web, so closing this issue.

@getify
Copy link
Contributor

getify commented Mar 18, 2015

Not disagreeing with the resolution here. I also think we should leave them 0-based. Such re-mapping of line numbers or column numbers is entirely in the realm of tools and not standards. IIRC, JSLint awhile back begrudgingly added a feature to change the numbering.

But the "would break the web" assertion is not terribly obvious. I've tried for a bit to come up with many practical use-cases where that's true and I can't. We might want to add more detail here, or somewhere, to document for posterity why that would be the case.

@mikesherov
Copy link
Contributor

"Break the web" is generic shorthand for "break all downstream consumers of esprima, acorn, and Spidermonkey".

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

6 participants