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

Unified Diff: src/preparser.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/parser.cc ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index f17bac2eac81ff399c3ac535040be7dee0a2f25c..886d81a9e600d069c7c913f7914f5c6360e5ba55 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -115,7 +115,8 @@ class PreParser {
i::ParserRecorder* log,
uintptr_t stack_limit,
bool allow_lazy,
- bool allow_natives_syntax)
+ bool allow_natives_syntax,
+ bool allow_modules)
: scanner_(scanner),
log_(log),
scope_(NULL),
@@ -124,6 +125,7 @@ class PreParser {
strict_mode_violation_type_(NULL),
stack_overflow_(false),
allow_lazy_(allow_lazy),
+ allow_modules_(allow_modules),
allow_natives_syntax_(allow_natives_syntax),
parenthesized_function_(false),
harmony_scoping_(scanner->HarmonyScoping()) { }
@@ -140,8 +142,9 @@ class PreParser {
uintptr_t stack_limit) {
bool allow_lazy = (flags & i::kAllowLazy) != 0;
bool allow_natives_syntax = (flags & i::kAllowNativesSyntax) != 0;
- return PreParser(scanner, log, stack_limit,
- allow_lazy, allow_natives_syntax).PreParse();
+ bool allow_modules = (flags & i::kAllowModules) != 0;
+ return PreParser(scanner, log, stack_limit, allow_lazy,
+ allow_natives_syntax, allow_modules).PreParse();
}
// Parses a single function literal, from the opening parentheses before
@@ -647,6 +650,7 @@ class PreParser {
const char* strict_mode_violation_type_;
bool stack_overflow_;
bool allow_lazy_;
+ bool allow_modules_;
bool allow_natives_syntax_;
bool parenthesized_function_;
bool harmony_scoping_;
« no previous file with comments | « src/parser.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698