| Index: src/parsing/scanner.h
|
| diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
|
| index b4c6b62d1488f5654869ca4e9bfedd2c03f79f1f..9a3dd8a02a28039bea1c10a22474cce01ce01315 100644
|
| --- a/src/parsing/scanner.h
|
| +++ b/src/parsing/scanner.h
|
| @@ -371,6 +371,10 @@ class Scanner {
|
| Token::Value peek() const { return next_.token; }
|
|
|
| Location peek_location() const { return next_.location; }
|
| + Location peek_ahead_location() const {
|
| + DCHECK(next_next_.token != Token::UNINITIALIZED);
|
| + return next_next_.location;
|
| + }
|
|
|
| bool literal_contains_escapes() const {
|
| return LiteralContainsEscapes(current_);
|
| @@ -387,8 +391,14 @@ class Scanner {
|
| return next_.literal_chars->is_contextual_keyword(keyword);
|
| }
|
|
|
| + bool is_next_next_contextual_keyword(Vector<const char> keyword) {
|
| + DCHECK_NOT_NULL(next_next_.literal_chars);
|
| + return next_next_.literal_chars->is_contextual_keyword(keyword);
|
| + }
|
| +
|
| const AstRawString* CurrentSymbol(AstValueFactory* ast_value_factory);
|
| const AstRawString* NextSymbol(AstValueFactory* ast_value_factory);
|
| + const AstRawString* NextNextSymbol(AstValueFactory* ast_value_factory);
|
| const AstRawString* CurrentRawSymbol(AstValueFactory* ast_value_factory);
|
|
|
| double DoubleValue();
|
| @@ -442,6 +452,13 @@ class Scanner {
|
| has_multiline_comment_before_next_;
|
| }
|
|
|
| + bool HasAnyLineTerminatorAfterNext() {
|
| + Token::Value ensure_next_next = PeekAhead();
|
| + USE(ensure_next_next);
|
| + return has_line_terminator_before_next2_ ||
|
| + has_multiline_comment_before_next2_;
|
| + }
|
| +
|
| // Scans the input as a regular expression pattern, previous
|
| // character(s) must be /(=). Returns true if a pattern is scanned.
|
| bool ScanRegExpPattern(bool seen_equal);
|
| @@ -787,6 +804,10 @@ class Scanner {
|
| // line-terminator after the current token, and before the next.
|
| bool has_multiline_comment_before_next_;
|
|
|
| + // For use with PeekAhead()
|
| + bool has_line_terminator_before_next2_;
|
| + bool has_multiline_comment_before_next2_;
|
| +
|
| // Whether this scanner encountered an HTML comment.
|
| bool found_html_comment_;
|
|
|
|
|