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

Unified Diff: src/parsing/scanner.h

Issue 2510873005: A decimal integer literal with a leading 0 is now an error in strict mode. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: src/parsing/scanner.h
diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
index f3fc02558e714da475f811b4504e649897b5a993..09c94b9e77b5e80cac8fe6248e092cb1c4e4fc68 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -274,13 +274,10 @@ class Scanner {
// Returns the location of the last seen octal literal.
Location octal_position() const { return octal_pos_; }
- void clear_octal_position() { octal_pos_ = Location::invalid(); }
- // Returns the location of the last seen decimal literal with a leading zero.
- Location decimal_with_leading_zero_position() const {
- return decimal_with_leading_zero_pos_;
- }
- void clear_decimal_with_leading_zero_position() {
- decimal_with_leading_zero_pos_ = Location::invalid();
+ MessageTemplate::Template octal_message() const { return octal_message_; }
+ void clear_octal_position() {
+ octal_pos_ = Location::invalid();
+ octal_message_ = MessageTemplate::kNone;
}
// Returns the value of the last smi that was scanned.
@@ -786,7 +783,7 @@ class Scanner {
// Last-seen positions of potentially problematic tokens.
Location octal_pos_;
- Location decimal_with_leading_zero_pos_;
+ MessageTemplate::Template octal_message_;
// One Unicode character look-ahead; c0_ < 0 at the end of the input.
uc32 c0_;

Powered by Google App Engine
This is Rietveld 408576698