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" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
696 ? scope_ : scope_->DeclarationScope(); | 696 ? scope_ : scope_->DeclarationScope(); |
697 } | 697 } |
698 | 698 |
699 // All ParseXXX functions take as the last argument an *ok parameter | 699 // All ParseXXX functions take as the last argument an *ok parameter |
700 // which is set to false if parsing failed; it is unchanged otherwise. | 700 // which is set to false if parsing failed; it is unchanged otherwise. |
701 // By making the 'exception handling' explicit, we are forced to check | 701 // By making the 'exception handling' explicit, we are forced to check |
702 // for failure at the call sites. | 702 // for failure at the call sites. |
703 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, | 703 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, |
704 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok); | 704 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok); |
705 Statement* ParseStatementListItem(bool* ok); | 705 Statement* ParseStatementListItem(bool* ok); |
706 Statement* ParseModule(bool* ok); | 706 void* ParseModule(ZoneList<Statement*>* body, bool* ok); |
rossberg
2015/02/25 13:35:42
Nit: Can we rename this to ParseModuleItemList, fo
adamk
2015/02/25 18:55:21
Sounds good, will rename in a one of these followu
| |
707 Statement* ParseModuleItem(bool* ok); | 707 Statement* ParseModuleItem(bool* ok); |
708 Literal* ParseModuleSpecifier(bool* ok); | 708 Literal* ParseModuleSpecifier(bool* ok); |
709 Statement* ParseImportDeclaration(bool* ok); | 709 Statement* ParseImportDeclaration(bool* ok); |
710 Statement* ParseExportDeclaration(bool* ok); | 710 Statement* ParseExportDeclaration(bool* ok); |
711 Statement* ParseExportDefault(bool* ok); | 711 Statement* ParseExportDefault(bool* ok); |
712 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, | 712 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, |
713 ZoneList<Scanner::Location>* export_locations, | 713 ZoneList<Scanner::Location>* export_locations, |
714 ZoneList<const AstRawString*>* local_names, | 714 ZoneList<const AstRawString*>* local_names, |
715 Scanner::Location* reserved_loc, bool* ok); | 715 Scanner::Location* reserved_loc, bool* ok); |
716 void* ParseNamedImports(ZoneList<const AstRawString*>* names, bool* ok); | 716 void* ParseNamedImports(ZoneList<const AstRawString*>* names, bool* ok); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
945 } | 945 } |
946 | 946 |
947 | 947 |
948 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 948 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
949 int start, Expression* tag) { | 949 int start, Expression* tag) { |
950 return parser_->CloseTemplateLiteral(state, start, tag); | 950 return parser_->CloseTemplateLiteral(state, start, tag); |
951 } | 951 } |
952 } } // namespace v8::internal | 952 } } // namespace v8::internal |
953 | 953 |
954 #endif // V8_PARSER_H_ | 954 #endif // V8_PARSER_H_ |
OLD | NEW |