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

Unified Diff: src/scanner.h

Issue 9352013: Extend scanner with new Harmony module keywords (under flag). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 10 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.h ('k') | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index c512ec3fefb68c6ecc858b2351d62dfbd134e046..e892fe0c1fbfdcb13139ec708ef7b5072cb1925f 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -51,8 +51,9 @@ enum ParsingFlags {
// STRICT_MODE,
// EXTENDED_MODE,
kLanguageModeMask = 0x03,
- kAllowLazy = 4,
- kAllowNativesSyntax = 8
+ kAllowLazy = 0x04,
+ kAllowNativesSyntax = 0x08,
+ kAllowModules = 0x10
};
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' as keywords.
+ bool harmony_modules_;
};
} } // namespace v8::internal
« no previous file with comments | « src/preparser.h ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698