Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(923)

Unified Diff: src/scanner-base.cc

Issue 6928059: Fix newly introduced bug in detecing octal numbers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added test to preparser test. Removed duplicates Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/preparser/preparser.expectation » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner-base.cc
diff --git a/src/scanner-base.cc b/src/scanner-base.cc
index 7af88cbbfff576ba1d3beafddb7786abbcdd73c4..e15ef416c9c4a8201bfc134db0a73f7928e565b4 100644
--- a/src/scanner-base.cc
+++ b/src/scanner-base.cc
@@ -564,6 +564,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) {
} else {
// if the first character is '0' we must check for octals and hex
if (c0_ == '0') {
+ int start_pos = source_pos(); // For reporting octal positions.
AddLiteralCharAdvance();
// either 0, 0exxx, 0Exxx, 0.xxx, an octal number, or a hex number
@@ -588,7 +589,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) {
}
if (c0_ < '0' || '7' < c0_) {
// Octal literal finished.
- octal_pos_ = next_.location;
+ octal_pos_ = Location(start_pos, source_pos());
break;
}
AddLiteralCharAdvance();
« no previous file with comments | « no previous file | test/preparser/preparser.expectation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698