WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
179340
Hex, octal and binary prefixes don't support capital letters
https://bugs.webkit.org/show_bug.cgi?id=179340
Summary
Hex, octal and binary prefixes don't support capital letters
d3x0r
Reported
2017-11-06 13:22:50 PST
https://github.com/WebKit/webkit/blob/master/Source/JavaScriptCore/parser/Lexer.cpp#L2104
Was browsing the source to see how numbers were parsed for potential complexity in supporting proposal
https://github.com/tc39/proposal-numeric-separator
. I found that only 'x', 'b', and 'o' is supported for numbers, although the standard says that capital or lower case letters should be allowed.
https://www.ecma-international.org/ecma-262/6.0/#sec-literals-numeric-literals
(ES6) I see that ES5 did not support 'o' or 'b' either.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2017-11-06 17:11:26 PST
I cannot reproduce in Safari 11.0.1. When I type "0XA" in Web Inspector console, I get "10" back. Looking at the code, it does ignore the case - that's what "m_current | 0x20" is for.
d3x0r
Comment 2
2017-11-06 18:19:17 PST
Oh right | 0x20; my bad.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug