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

Unified Diff: src/scanner-base.h

Issue 7207007: Proper handling of future reserved words in strict and normal mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 9 years, 6 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 | « src/preparser.cc ('k') | src/scanner-base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner-base.h
diff --git a/src/scanner-base.h b/src/scanner-base.h
index b5195100a57c47f1916dddd2e6f7cb5349c544a3..3d67d4e1eadb5633e82e11d10204f1ebe4de5ec7 100644
--- a/src/scanner-base.h
+++ b/src/scanner-base.h
@@ -549,14 +549,20 @@ class JavaScriptScanner : public Scanner {
class KeywordMatcher {
// Incrementally recognize keywords.
//
+// We distinguish between normal future reserved words and words that are
+// considered to be future reserved words only in strict mode as required by
+// ECMA-262 7.6.1.2.
+//
// Recognized as keywords:
// break, case, catch, const*, continue, debugger, default, delete, do,
// else, finally, false, for, function, if, in, instanceof, new, null,
// return, switch, this, throw, true, try, typeof, var, void, while, with.
//
-// Recognized as Future Reserved Keywords (normal and strict mode):
-// class, enum, export, extends, implements, import, interface,
-// let, package, private, private, protected, public, public,
+// Recognized as Future Reserved Keywords:
+// class, enum, export, extends, import, super.
+//
+// Recognized as Future Reserved Keywords (strict mode only):
+// implements, interface, let, package, private, protected, public,
// static, yield.
//
// *: Actually a "future reserved keyword". It's the only one we are
« no previous file with comments | « src/preparser.cc ('k') | src/scanner-base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698