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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 | 1035 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 |
1036 void InsertSloppyBlockFunctionVarBindings(Scope* scope, | 1036 void InsertSloppyBlockFunctionVarBindings(Scope* scope, |
1037 Scope* complex_params_scope, | 1037 Scope* complex_params_scope, |
1038 bool* ok); | 1038 bool* ok); |
1039 | 1039 |
1040 // Parser support | 1040 // Parser support |
1041 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); | 1041 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
1042 Variable* Declare(Declaration* declaration, | 1042 Variable* Declare(Declaration* declaration, |
1043 DeclarationDescriptor::Kind declaration_kind, bool resolve, | 1043 DeclarationDescriptor::Kind declaration_kind, bool resolve, |
1044 bool* ok, Scope* declaration_scope = nullptr); | 1044 bool* ok, Scope* declaration_scope = nullptr); |
1045 void DeclareImport(const AstRawString* local_name, int pos, bool* ok); | 1045 void DeclareConstVariable(const AstRawString* name, InitializationFlag init, |
| 1046 int pos, bool* ok); |
1046 | 1047 |
1047 bool TargetStackContainsLabel(const AstRawString* label); | 1048 bool TargetStackContainsLabel(const AstRawString* label); |
1048 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 1049 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
1049 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 1050 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
1050 | 1051 |
1051 Statement* BuildAssertIsCoercible(Variable* var); | 1052 Statement* BuildAssertIsCoercible(Variable* var); |
1052 | 1053 |
1053 // Factory methods. | 1054 // Factory methods. |
1054 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super, | 1055 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super, |
1055 int pos, int end_pos, | 1056 int pos, int end_pos, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 | 1323 |
1323 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1324 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1324 return parser_->ParseDoExpression(ok); | 1325 return parser_->ParseDoExpression(ok); |
1325 } | 1326 } |
1326 | 1327 |
1327 | 1328 |
1328 } // namespace internal | 1329 } // namespace internal |
1329 } // namespace v8 | 1330 } // namespace v8 |
1330 | 1331 |
1331 #endif // V8_PARSING_PARSER_H_ | 1332 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |