| 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),
|
|
|