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