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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 void InsertShadowingVarBindingInitializers(Block* block); | 1075 void InsertShadowingVarBindingInitializers(Block* block); |
1076 | 1076 |
1077 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 | 1077 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 |
1078 void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope, | 1078 void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope, |
1079 Scope* complex_params_scope, | 1079 Scope* complex_params_scope, |
1080 bool* ok); | 1080 bool* ok); |
1081 | 1081 |
1082 // Parser support | 1082 // Parser support |
1083 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); | 1083 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
1084 Variable* Declare(Declaration* declaration, | 1084 Variable* Declare(Declaration* declaration, |
1085 DeclarationDescriptor::Kind declaration_kind, bool resolve, | 1085 DeclarationDescriptor::Kind declaration_kind, bool* ok, |
1086 bool* ok, Scope* declaration_scope = nullptr); | 1086 Scope* declaration_scope = nullptr); |
1087 void DeclareImport(const AstRawString* local_name, int pos, bool* ok); | 1087 void DeclareImport(const AstRawString* local_name, int pos, bool* ok); |
1088 | 1088 |
1089 bool TargetStackContainsLabel(const AstRawString* label); | 1089 bool TargetStackContainsLabel(const AstRawString* label); |
1090 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 1090 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
1091 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 1091 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
1092 | 1092 |
1093 Statement* BuildAssertIsCoercible(Variable* var); | 1093 Statement* BuildAssertIsCoercible(Variable* var); |
1094 | 1094 |
1095 // Factory methods. | 1095 // Factory methods. |
1096 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super, | 1096 FunctionLiteral* DefaultConstructor(const AstRawString* name, bool call_super, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 | 1363 |
1364 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1364 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1365 return parser_->ParseDoExpression(ok); | 1365 return parser_->ParseDoExpression(ok); |
1366 } | 1366 } |
1367 | 1367 |
1368 | 1368 |
1369 } // namespace internal | 1369 } // namespace internal |
1370 } // namespace v8 | 1370 } // namespace v8 |
1371 | 1371 |
1372 #endif // V8_PARSING_PARSER_H_ | 1372 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |