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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 } | 901 } |
902 Scope* DeclarationScope(VariableMode mode) { | 902 Scope* DeclarationScope(VariableMode mode) { |
903 return IsLexicalVariableMode(mode) | 903 return IsLexicalVariableMode(mode) |
904 ? scope_ : scope_->DeclarationScope(); | 904 ? scope_ : scope_->DeclarationScope(); |
905 } | 905 } |
906 | 906 |
907 // All ParseXXX functions take as the last argument an *ok parameter | 907 // All ParseXXX functions take as the last argument an *ok parameter |
908 // which is set to false if parsing failed; it is unchanged otherwise. | 908 // which is set to false if parsing failed; it is unchanged otherwise. |
909 // By making the 'exception handling' explicit, we are forced to check | 909 // By making the 'exception handling' explicit, we are forced to check |
910 // for failure at the call sites. | 910 // for failure at the call sites. |
911 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, | 911 void* ParseStatementList(ZoneList<Statement*>* body, int end_token, bool* ok); |
912 bool is_eval, Scope** ad_hoc_eval_scope, bool* ok); | |
913 Statement* ParseStatementListItem(bool* ok); | 912 Statement* ParseStatementListItem(bool* ok); |
914 void* ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); | 913 void* ParseModuleItemList(ZoneList<Statement*>* body, bool* ok); |
915 Statement* ParseModuleItem(bool* ok); | 914 Statement* ParseModuleItem(bool* ok); |
916 const AstRawString* ParseModuleSpecifier(bool* ok); | 915 const AstRawString* ParseModuleSpecifier(bool* ok); |
917 Statement* ParseImportDeclaration(bool* ok); | 916 Statement* ParseImportDeclaration(bool* ok); |
918 Statement* ParseExportDeclaration(bool* ok); | 917 Statement* ParseExportDeclaration(bool* ok); |
919 Statement* ParseExportDefault(bool* ok); | 918 Statement* ParseExportDefault(bool* ok); |
920 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, | 919 void* ParseExportClause(ZoneList<const AstRawString*>* export_names, |
921 ZoneList<Scanner::Location>* export_locations, | 920 ZoneList<Scanner::Location>* export_locations, |
922 ZoneList<const AstRawString*>* local_names, | 921 ZoneList<const AstRawString*>* local_names, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 } | 1171 } |
1173 | 1172 |
1174 | 1173 |
1175 Expression* ParserTraits::SpreadCallNew( | 1174 Expression* ParserTraits::SpreadCallNew( |
1176 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { | 1175 Expression* function, ZoneList<v8::internal::Expression*>* args, int pos) { |
1177 return parser_->SpreadCallNew(function, args, pos); | 1176 return parser_->SpreadCallNew(function, args, pos); |
1178 } | 1177 } |
1179 } } // namespace v8::internal | 1178 } } // namespace v8::internal |
1180 | 1179 |
1181 #endif // V8_PARSER_H_ | 1180 #endif // V8_PARSER_H_ |
OLD | NEW |