| 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_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
| 6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 typedef AstNodeFactory Factory; | 392 typedef AstNodeFactory Factory; |
| 393 }; | 393 }; |
| 394 | 394 |
| 395 explicit ParserTraits(Parser* parser) : parser_(parser) {} | 395 explicit ParserTraits(Parser* parser) : parser_(parser) {} |
| 396 | 396 |
| 397 // Helper functions for recursive descent. | 397 // Helper functions for recursive descent. |
| 398 bool IsEval(const AstRawString* identifier) const; | 398 bool IsEval(const AstRawString* identifier) const; |
| 399 bool IsArguments(const AstRawString* identifier) const; | 399 bool IsArguments(const AstRawString* identifier) const; |
| 400 bool IsEvalOrArguments(const AstRawString* identifier) const; | 400 bool IsEvalOrArguments(const AstRawString* identifier) const; |
| 401 bool IsUndefined(const AstRawString* identifier) const; | 401 bool IsUndefined(const AstRawString* identifier) const; |
| 402 bool IsAwait(const AstRawString* identifier) const; | |
| 403 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; | 402 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; |
| 404 | 403 |
| 405 // Returns true if the expression is of type "this.foo". | 404 // Returns true if the expression is of type "this.foo". |
| 406 static bool IsThisProperty(Expression* expression); | 405 static bool IsThisProperty(Expression* expression); |
| 407 | 406 |
| 408 static bool IsIdentifier(Expression* expression); | 407 static bool IsIdentifier(Expression* expression); |
| 409 | 408 |
| 410 bool IsPrototype(const AstRawString* identifier) const; | 409 bool IsPrototype(const AstRawString* identifier) const; |
| 411 | 410 |
| 412 bool IsConstructor(const AstRawString* identifier) const; | 411 bool IsConstructor(const AstRawString* identifier) const; |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 | 1351 |
| 1353 Expression* ParserTraits::RewriteYieldStar(Expression* generator, | 1352 Expression* ParserTraits::RewriteYieldStar(Expression* generator, |
| 1354 Expression* iterable, int pos) { | 1353 Expression* iterable, int pos) { |
| 1355 return parser_->RewriteYieldStar(generator, iterable, pos); | 1354 return parser_->RewriteYieldStar(generator, iterable, pos); |
| 1356 } | 1355 } |
| 1357 | 1356 |
| 1358 } // namespace internal | 1357 } // namespace internal |
| 1359 } // namespace v8 | 1358 } // namespace v8 |
| 1360 | 1359 |
| 1361 #endif // V8_PARSING_PARSER_H_ | 1360 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |