| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_PARSING_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 // Dummy functions, just useful as arguments to CHECK_OK_CUSTOM. | 804 // Dummy functions, just useful as arguments to CHECK_OK_CUSTOM. |
| 805 static void Void() {} | 805 static void Void() {} |
| 806 template <typename T> | 806 template <typename T> |
| 807 static T Return(T result) { | 807 static T Return(T result) { |
| 808 return result; | 808 return result; |
| 809 } | 809 } |
| 810 | 810 |
| 811 bool is_any_identifier(Token::Value token) { | 811 bool is_any_identifier(Token::Value token) { |
| 812 return token == Token::IDENTIFIER || token == Token::ENUM || | 812 return token == Token::IDENTIFIER || token == Token::ENUM || |
| 813 token == Token::AWAIT || token == Token::ASYNC || | 813 token == Token::AWAIT || token == Token::ASYNC || |
| 814 token == Token::ESCAPED_STRICT_RESERVED_WORD || |
| 814 token == Token::FUTURE_STRICT_RESERVED_WORD || token == Token::LET || | 815 token == Token::FUTURE_STRICT_RESERVED_WORD || token == Token::LET || |
| 815 token == Token::STATIC || token == Token::YIELD; | 816 token == Token::STATIC || token == Token::YIELD; |
| 816 } | 817 } |
| 817 bool peek_any_identifier() { return is_any_identifier(peek()); } | 818 bool peek_any_identifier() { return is_any_identifier(peek()); } |
| 818 | 819 |
| 819 bool CheckContextualKeyword(Vector<const char> keyword) { | 820 bool CheckContextualKeyword(Vector<const char> keyword) { |
| 820 if (PeekContextualKeyword(keyword)) { | 821 if (PeekContextualKeyword(keyword)) { |
| 821 Consume(Token::IDENTIFIER); | 822 Consume(Token::IDENTIFIER); |
| 822 return true; | 823 return true; |
| 823 } | 824 } |
| (...skipping 4933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5757 } | 5758 } |
| 5758 | 5759 |
| 5759 #undef CHECK_OK | 5760 #undef CHECK_OK |
| 5760 #undef CHECK_OK_CUSTOM | 5761 #undef CHECK_OK_CUSTOM |
| 5761 #undef CHECK_OK_VOID | 5762 #undef CHECK_OK_VOID |
| 5762 | 5763 |
| 5763 } // namespace internal | 5764 } // namespace internal |
| 5764 } // namespace v8 | 5765 } // namespace v8 |
| 5765 | 5766 |
| 5766 #endif // V8_PARSING_PARSER_BASE_H | 5767 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |