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

Unified Diff: src/parsing/scanner.h

Issue 1801203002: Parser: Make skipping HTML comments optional. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 9 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 0cde0c2c02b79dd172cdbd613d8717af8c01f745..53742c0b4bdb06363814c3248b18a7865b46c6be 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -340,7 +340,7 @@ class Scanner {
// -1 is outside of the range of any real source code.
static const int kNoOctalLocation = -1;
- explicit Scanner(UnicodeCache* scanner_contants);
+ Scanner(UnicodeCache* scanner_contants, bool allow_html_comments);
void Initialize(Utf16CharacterStream* source);
@@ -761,6 +761,9 @@ 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 to allow HTML comments (that is, skip over them, rather than
+ // reporting the comment marker as a sequence of tokens.)
+ bool allow_html_comments_;
// Whether this scanner encountered an HTML comment.
bool found_html_comment_;
« 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