Index: src/scanner.h |
diff --git a/src/scanner.h b/src/scanner.h |
index 2979082e3f152623527df8a69a4b2d177f592323..5e2e065b3f97c4c702759cb57da996c8ce4abd08 100644 |
--- a/src/scanner.h |
+++ b/src/scanner.h |
@@ -450,6 +450,9 @@ class Scanner { |
// be empty). |
bool ScanRegExpFlags(); |
+ bool HasSourceMapComment() { return has_source_map_comment_; } |
+ Handle<String> AllocateInternalizedSourceMapComment(Isolate* isolate); |
+ |
private: |
// The current and look-ahead token. |
struct TokenDesc { |
@@ -571,6 +574,7 @@ class Scanner { |
bool SkipWhiteSpace(); |
Token::Value SkipSingleLineComment(); |
+ Token::Value SkipSourceMapComment(); |
Token::Value SkipMultiLineComment(); |
// Scans a possible HTML comment -- begins with '<!'. |
Token::Value ScanHtmlComment(); |
@@ -605,6 +609,8 @@ class Scanner { |
LiteralBuffer literal_buffer1_; |
LiteralBuffer literal_buffer2_; |
+ LiteralBuffer source_map_comment_; |
+ |
TokenDesc current_; // desc for current token (as returned by Next()) |
TokenDesc next_; // desc for next token (one token look-ahead) |
@@ -625,6 +631,8 @@ 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 the last line we have scanned is a source map comment. |
+ bool has_source_map_comment_; |
// Whether we scan 'let' as a keyword for harmony block-scoped let bindings. |
bool harmony_scoping_; |
// Whether we scan 'module', 'import', 'export' as keywords. |