Skip to content

Commit

Permalink
parser: allow uppercase letters in number literals
Browse files Browse the repository at this point in the history
Refs: https://github.com/metarhia/jstp/issues/152
PR-URL: metarhia/jstp#239
Reviewed-By: Dmytro Nechai <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
  • Loading branch information
belochub committed Jul 21, 2018
1 parent 102b262 commit f273459
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/jsrs_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ MaybeLocal<Value> ParseNumber(Isolate* isolate,
if (*number_start == '0') {
number_start++;

if (*number_start == 'b') {
if (*number_start == 'b' || *number_start == 'B') {
base = 2;
number_start++;
} else if (*number_start == 'o') {
} else if (*number_start == 'o' || *number_start == 'O') {
base = 8;
number_start++;
} else if (*number_start == 'x') {
} else if (*number_start == 'x' || *number_start == 'X') {
base = 16;
number_start++;
} else if (isdigit(*number_start)) {
Expand Down

0 comments on commit f273459

Please sign in to comment.