| Index: src/scanner-base.cc
|
| ===================================================================
|
| --- src/scanner-base.cc (revision 6955)
|
| +++ src/scanner-base.cc (working copy)
|
| @@ -61,7 +61,8 @@
|
| // Scanner
|
|
|
| Scanner::Scanner(Isolate* isolate)
|
| - : scanner_constants_(isolate->scanner_constants()) {
|
| + : scanner_constants_(isolate->scanner_constants()),
|
| + octal_pos_(kNoOctalLocation) {
|
| }
|
|
|
|
|
| @@ -96,6 +97,7 @@
|
| // Octal escapes of the forms '\0xx' and '\xxx' are not a part of
|
| // ECMA-262. Other JS VMs support them.
|
| uc32 Scanner::ScanOctalEscape(uc32 c, int length) {
|
| + octal_pos_ = source_pos() - 1; // Already advanced
|
| uc32 x = c - '0';
|
| for (int i = 0; i < length; i++) {
|
| int d = c0_ - '0';
|
| @@ -599,7 +601,11 @@
|
| kind = DECIMAL;
|
| break;
|
| }
|
| - if (c0_ < '0' || '7' < c0_) break;
|
| + if (c0_ < '0' || '7' < c0_) {
|
| + // Octal literal finished.
|
| + octal_pos_ = next_.location.beg_pos;
|
| + break;
|
| + }
|
| AddLiteralCharAdvance();
|
| }
|
| }
|
|
|