| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 Expression* RewriteInstanceof(Expression* lhs, Expression* rhs, int pos); | 660 Expression* RewriteInstanceof(Expression* lhs, Expression* rhs, int pos); |
| 661 | 661 |
| 662 private: | 662 private: |
| 663 Parser* parser_; | 663 Parser* parser_; |
| 664 | 664 |
| 665 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator, | 665 void BuildIteratorClose(ZoneList<Statement*>* statements, Variable* iterator, |
| 666 Maybe<Variable*> input, Variable* output); | 666 Maybe<Variable*> input, Variable* output); |
| 667 void BuildIteratorCloseForCompletion( | 667 void BuildIteratorCloseForCompletion( |
| 668 ZoneList<Statement*>* statements, Variable* iterator, | 668 ZoneList<Statement*>* statements, Variable* iterator, |
| 669 Variable* body_threw); | 669 Variable* body_threw); |
| 670 Statement* CheckCallable(Variable* var, Expression* error); | 670 Statement* CheckCallable(Variable* var, Expression* error, int pos); |
| 671 }; | 671 }; |
| 672 | 672 |
| 673 | 673 |
| 674 class Parser : public ParserBase<ParserTraits> { | 674 class Parser : public ParserBase<ParserTraits> { |
| 675 public: | 675 public: |
| 676 explicit Parser(ParseInfo* info); | 676 explicit Parser(ParseInfo* info); |
| 677 ~Parser() { | 677 ~Parser() { |
| 678 delete reusable_preparser_; | 678 delete reusable_preparser_; |
| 679 reusable_preparser_ = NULL; | 679 reusable_preparser_ = NULL; |
| 680 delete cached_parse_data_; | 680 delete cached_parse_data_; |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 | 1237 |
| 1238 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1238 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
| 1239 return parser_->ParseDoExpression(ok); | 1239 return parser_->ParseDoExpression(ok); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 | 1242 |
| 1243 } // namespace internal | 1243 } // namespace internal |
| 1244 } // namespace v8 | 1244 } // namespace v8 |
| 1245 | 1245 |
| 1246 #endif // V8_PARSING_PARSER_H_ | 1246 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |