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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1012 // The var declarations are hoisted to the function scope, but originate from | 1012 // The var declarations are hoisted to the function scope, but originate from |
1013 // a scope where the name has also been let bound or the var declaration is | 1013 // a scope where the name has also been let bound or the var declaration is |
1014 // hoisted over such a scope. | 1014 // hoisted over such a scope. |
1015 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); | 1015 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); |
1016 | 1016 |
1017 // Insert initializer statements for var-bindings shadowing parameter bindings | 1017 // Insert initializer statements for var-bindings shadowing parameter bindings |
1018 // from a non-simple parameter list. | 1018 // from a non-simple parameter list. |
1019 void InsertShadowingVarBindingInitializers(Block* block); | 1019 void InsertShadowingVarBindingInitializers(Block* block); |
1020 | 1020 |
1021 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 | 1021 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 |
1022 void InsertSloppyBlockFunctionVarBindings(Scope* scope, bool* ok); | 1022 void InsertSloppyBlockFunctionVarBindings(Scope* scope, bool check_outer, |
Dan Ehrenberg
2016/06/28 01:07:00
Nit: call this outer_is_param_scope here too?
bakkot
2016/06/28 01:19:37
Whoops, done.
| |
1023 bool* ok); | |
1023 | 1024 |
1024 // Parser support | 1025 // Parser support |
1025 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); | 1026 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
1026 Variable* Declare(Declaration* declaration, | 1027 Variable* Declare(Declaration* declaration, |
1027 DeclarationDescriptor::Kind declaration_kind, bool resolve, | 1028 DeclarationDescriptor::Kind declaration_kind, bool resolve, |
1028 bool* ok, Scope* declaration_scope = nullptr); | 1029 bool* ok, Scope* declaration_scope = nullptr); |
1029 | 1030 |
1030 bool TargetStackContainsLabel(const AstRawString* label); | 1031 bool TargetStackContainsLabel(const AstRawString* label); |
1031 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 1032 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
1032 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 1033 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1295 | 1296 |
1296 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1297 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1297 return parser_->ParseDoExpression(ok); | 1298 return parser_->ParseDoExpression(ok); |
1298 } | 1299 } |
1299 | 1300 |
1300 | 1301 |
1301 } // namespace internal | 1302 } // namespace internal |
1302 } // namespace v8 | 1303 } // namespace v8 |
1303 | 1304 |
1304 #endif // V8_PARSING_PARSER_H_ | 1305 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |