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

Unified Diff: src/scanner-base.h

Issue 7211013: Combined identical classes V8JavaScriptScanner and StandAloneJavaScriptScanner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/scanner.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 02566ddebb6014a629c10b0095b8aa5984a82273..39a118e00abc727ad8153ec68c028d9ea9564d42 100644
--- a/src/scanner-base.h
+++ b/src/scanner-base.h
@@ -471,6 +471,8 @@ class JavaScriptScanner : public Scanner {
explicit JavaScriptScanner(UnicodeCache* scanner_contants);
+ void Initialize(UC16CharacterStream* source);
+
// Returns the next token.
Token::Value Next();
@@ -539,14 +541,20 @@ class JavaScriptScanner : public Scanner {
class KeywordMatcher {
// Incrementally recognize keywords.
//
-// Recognized keywords:
-// break case catch const* continue debugger* default delete do else
-// finally false for function if in instanceof native* new null
-// return switch this throw true try typeof var void while with
+// 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,
+// static, yield.
+//
+// *: Actually a "future reserved keyword". It's the only one we are
+// recognizing outside of ES5 strict mode, the remaining are allowed
+// as identifiers.
//
-// *: Actually "future reserved keywords". These are the only ones we
-// recognize, the remaining are allowed as identifiers.
-// In ES5 strict mode, we should disallow all reserved keywords.
public:
KeywordMatcher()
: state_(INITIAL),
« no previous file with comments | « src/scanner.cc ('k') | src/scanner-base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698