| Index: src/parsing/scanner.h
|
| diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
|
| index 22c504c98ea206b760d84ae76b8bb85b5ddfe81c..996eadac65aa8628c6cf52981cbc493c43d1b98b 100644
|
| --- a/src/parsing/scanner.h
|
| +++ b/src/parsing/scanner.h
|
| @@ -365,6 +365,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_);
|
| @@ -381,8 +385,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();
|
| @@ -436,6 +446,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);
|
| @@ -781,6 +798,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_;
|
|
|
|
|