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

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: Unify behavior for optimized and non-optimized executions 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
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.h
diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
index 0acc7ab019a1c7e033ec9160d905990b4419b1bf..e210307f417633b7161dd89e370fa36caef5ff1d 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -349,7 +349,7 @@ class Scanner {
explicit Scanner(UnicodeCache* scanner_contants);
- void Initialize(Utf16CharacterStream* source);
+ void Initialize(Utf16CharacterStream* source, bool allow_html_comments);
// Returns the next token and advances input.
Token::Value Next();
@@ -804,6 +804,11 @@ class Scanner {
// Whether this scanner encountered an HTML comment.
bool found_html_comment_;
+ // Whether this scanner should interpret character sequences describing HTML
+ // comments as JavaScript comment delimiters (as per ES2015 section B.1.3,
+ // "HTML-like Comments")
+ bool allow_html_comments_;
+
bool allow_harmony_exponentiation_operator_;
MessageTemplate::Template scanner_error_;
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698