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

Unified Diff: src/parsing/scanner.h

Issue 2009963002: [modules] Disable HTML-like comments Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
Index: src/parsing/scanner.h
diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
index 0acc7ab019a1c7e033ec9160d905990b4419b1bf..a63d72f6ba378200e882ff30457fa5abc9bef67a 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -474,6 +474,8 @@ class Scanner {
bool FoundHtmlComment() const { return found_html_comment_; }
+ void set_module(bool module) { module_ = module; }
+
#define DECLARE_ACCESSORS(name) \
inline bool allow_##name() const { return allow_##name##_; } \
inline void set_allow_##name(bool allow) { allow_##name##_ = allow; }
@@ -804,6 +806,9 @@ class Scanner {
// Whether this scanner encountered an HTML comment.
bool found_html_comment_;
+ // Whether this scanner is currently scanning ECMAScript module code
+ bool module_;
+
bool allow_harmony_exponentiation_operator_;
MessageTemplate::Template scanner_error_;
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/scanner.cc » ('j') | src/parsing/scanner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698