-
Notifications
You must be signed in to change notification settings - Fork 13
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
'\xxx' not recognized #4
Comments
Thanks for reporting this. The reason why JScrewIt does not parse octal escape sequences is that they are illegal in strict mode. For example, ES6 modules are always strict mode code. A script containing the literal I think a good solution is adding a feature to explicitly enable octal escape sequences and legacy octal numbers. In the UI, this would be enabled in all compatibility modes except maximum compatibility and custom compatibility when the option "Generate strict mode code" is checked. |
A feature "NON_STRICT" containing "INCR_CHAR" and "LEGAL_OCT" and etc? |
There should be a feature "LEGACY_OCT". A combined feature "NON_STRICT" wouldn't be particularly useful because both "INCR_CHAR" and "LEGACY_OCT" would be already available in all engines. The point is that some strict mode restrictions are not properly enforced everywhere: Node.js <= 4 forbids legacy octals in strict mode but allows increments on chars; IE 9 in strict mode allows both. Anyway there is already a strict mode environment, it's called "forced-strict-mode". This is now used to remove "INCR_CHAR" in strict mode from some engines but not from others (precisely from engines with the attribute "char-increment-restriction"). The same method should be used for legacy octals when the new feature is introduced. |
'\040' 28903 bytes as Function("return '\040'")() instead of directly describe char32(space)?
The text was updated successfully, but these errors were encountered: