-
Notifications
You must be signed in to change notification settings - Fork 587
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
Parser don't allow leading 0 #487
Comments
https://262.ecma-international.org/5.1/#sec-7.8.3 leading zeroes are not permitted under es5. Your browser's javascript engine has been running es6 for a very long time, which otto does not support, as stated in the readme. |
Okey thanks, never actually coded for es5, so didn't know about this. I guess I'll have to find another way. |
Consider transpiling your ES6 to ES5 to run it under otto. |
@Asday is correct that's not a ES5 feature, but I'm happy to accept PR's which push us towards ES6. |
This is probably the incorrect location for this discussion, but I was wondering about that, @stevenh. Do you suppose that ES6 support should be something separated from the ES5 support by some measure? Perhaps, on an If you were to accept PRs that implement little features here and there, especially if they're simple low-hanging fruit such as math functions and leading zeroes in numeric literals, I could imagine new users would start using otto, use some ES6 features, think that they all work, and then become frustrated when shiny-new-library.js doesn't work in hard to debug ways. They already don't read that bit in the readme that says "ES5 only", so I don't think making it a more complex "ES5 only except this, this, this, this, and this" would help either. |
Before answering that are you aware of any backwards incompatible changes in ES6? |
Not one. |
In that case it sounds like we can make gradual progress towards ES6 without the need for a separate branch which would increase the overhead. We'll just need to create a way of tracking, so it's clear what has been done. Obviously encouraging people to contribute enhancements / bug fixes to address issues as they occur will be key to that. |
Hi,
I'm trying to parse a js file from a website, but the parser fails where my browser is fine.
The relevant js line is: "AddGenWeeks(22,08,2022,1,52,form.elements["weeks"]);"
Is it expected result? Is there any workaround?
The text was updated successfully, but these errors were encountered: