| 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_PARSER_H_ | 5 #ifndef V8_PARSER_H_ |
| 6 #define V8_PARSER_H_ | 6 #define V8_PARSER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 // For constructing objects returned by the traversing functions. | 562 // For constructing objects returned by the traversing functions. |
| 563 typedef AstNodeFactory Factory; | 563 typedef AstNodeFactory Factory; |
| 564 }; | 564 }; |
| 565 | 565 |
| 566 explicit ParserTraits(Parser* parser) : parser_(parser) {} | 566 explicit ParserTraits(Parser* parser) : parser_(parser) {} |
| 567 | 567 |
| 568 // Helper functions for recursive descent. | 568 // Helper functions for recursive descent. |
| 569 bool IsEval(const AstRawString* identifier) const; | 569 bool IsEval(const AstRawString* identifier) const; |
| 570 bool IsArguments(const AstRawString* identifier) const; | 570 bool IsArguments(const AstRawString* identifier) const; |
| 571 bool IsEvalOrArguments(const AstRawString* identifier) const; | 571 bool IsEvalOrArguments(const AstRawString* identifier) const; |
| 572 bool IsUndefined(const AstRawString* identifier) const; |
| 572 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; | 573 V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const; |
| 573 | 574 |
| 574 // Returns true if the expression is of type "this.foo". | 575 // Returns true if the expression is of type "this.foo". |
| 575 static bool IsThisProperty(Expression* expression); | 576 static bool IsThisProperty(Expression* expression); |
| 576 | 577 |
| 577 static bool IsIdentifier(Expression* expression); | 578 static bool IsIdentifier(Expression* expression); |
| 578 | 579 |
| 579 bool IsPrototype(const AstRawString* identifier) const; | 580 bool IsPrototype(const AstRawString* identifier) const; |
| 580 | 581 |
| 581 bool IsConstructor(const AstRawString* identifier) const; | 582 bool IsConstructor(const AstRawString* identifier) const; |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 } | 1160 } |
| 1160 | 1161 |
| 1161 | 1162 |
| 1162 Expression* ParserTraits::SpreadCallNew( | 1163 Expression* ParserTraits::SpreadCallNew( |
| 1163 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1164 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
| 1164 return parser_->SpreadCallNew(function, args, pos); | 1165 return parser_->SpreadCallNew(function, args, pos); |
| 1165 } | 1166 } |
| 1166 } } // namespace v8::internal | 1167 } } // namespace v8::internal |
| 1167 | 1168 |
| 1168 #endif // V8_PARSER_H_ | 1169 #endif // V8_PARSER_H_ |
| OLD | NEW |