Chromium Code Reviews| Index: src/scanner.h |
| diff --git a/src/scanner.h b/src/scanner.h |
| index c512ec3fefb68c6ecc858b2351d62dfbd134e046..a1a377f653829e7a82d45235dd2bb741aaef612d 100644 |
| --- a/src/scanner.h |
| +++ b/src/scanner.h |
| @@ -52,7 +52,8 @@ enum ParsingFlags { |
| // EXTENDED_MODE, |
| kLanguageModeMask = 0x03, |
| kAllowLazy = 4, |
| - kAllowNativesSyntax = 8 |
| + kAllowNativesSyntax = 8, |
| + kAllowModules = 16 |
|
Michael Starzinger
2012/02/07 14:50:59
Can we either change this constant (and the two ab
rossberg
2012/02/08 10:32:42
Done.
|
| }; |
| STATIC_ASSERT((kLanguageModeMask & CLASSIC_MODE) == CLASSIC_MODE); |
| @@ -403,8 +404,14 @@ class Scanner { |
| bool HarmonyScoping() const { |
| return harmony_scoping_; |
| } |
| - void SetHarmonyScoping(bool block_scoping) { |
| - harmony_scoping_ = block_scoping; |
| + void SetHarmonyScoping(bool scoping) { |
| + harmony_scoping_ = scoping; |
| + } |
| + bool HarmonyModules() const { |
| + return harmony_modules_; |
| + } |
| + void SetHarmonyModules(bool modules) { |
| + harmony_modules_ = modules; |
| } |
| @@ -552,9 +559,10 @@ class Scanner { |
| // Whether there is a multi-line comment that contains a |
| // line-terminator after the current token, and before the next. |
| bool has_multiline_comment_before_next_; |
| - // Whether we scan 'let' as a keyword for harmony block scoped |
| - // let bindings. |
| + // Whether we scan 'let' as a keyword for harmony block-scoped let bindings. |
| bool harmony_scoping_; |
| + // Whether we scan 'module', 'import', 'export', and 'from' as keywords. |
|
Michael Starzinger
2012/02/07 14:50:59
I don't see "from" being a keyword in the scanner.
rossberg
2012/02/08 10:32:42
Oops, leftover.
|
| + bool harmony_modules_; |
| }; |
| } } // namespace v8::internal |