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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 892 |
893 bool IsBindingContext() const { return IsBindingContext(context_); } | 893 bool IsBindingContext() const { return IsBindingContext(context_); } |
894 bool IsInitializerContext() const { return context_ != ASSIGNMENT; } | 894 bool IsInitializerContext() const { return context_ != ASSIGNMENT; } |
895 bool IsAssignmentContext() const { return IsAssignmentContext(context_); } | 895 bool IsAssignmentContext() const { return IsAssignmentContext(context_); } |
896 bool IsAssignmentContext(PatternContext c) const; | 896 bool IsAssignmentContext(PatternContext c) const; |
897 bool IsBindingContext(PatternContext c) const; | 897 bool IsBindingContext(PatternContext c) const; |
898 bool IsSubPattern() const { return recursion_level_ > 1; } | 898 bool IsSubPattern() const { return recursion_level_ > 1; } |
899 PatternContext SetAssignmentContextIfNeeded(Expression* node); | 899 PatternContext SetAssignmentContextIfNeeded(Expression* node); |
900 PatternContext SetInitializerContextIfNeeded(Expression* node); | 900 PatternContext SetInitializerContextIfNeeded(Expression* node); |
901 | 901 |
| 902 void RewriteParameterScopes(Expression* expr); |
| 903 |
902 Variable* CreateTempVar(Expression* value = nullptr); | 904 Variable* CreateTempVar(Expression* value = nullptr); |
903 | 905 |
904 AstNodeFactory* factory() const { return parser_->factory(); } | 906 AstNodeFactory* factory() const { return parser_->factory(); } |
905 AstValueFactory* ast_value_factory() const { | 907 AstValueFactory* ast_value_factory() const { |
906 return parser_->ast_value_factory(); | 908 return parser_->ast_value_factory(); |
907 } | 909 } |
908 Zone* zone() const { return parser_->zone(); } | 910 Zone* zone() const { return parser_->zone(); } |
909 Scope* scope() const { return scope_; } | 911 Scope* scope() const { return scope_; } |
910 | 912 |
911 Scope* scope_; | 913 Scope* scope_; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 | 1295 |
1294 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1296 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1295 return parser_->ParseDoExpression(ok); | 1297 return parser_->ParseDoExpression(ok); |
1296 } | 1298 } |
1297 | 1299 |
1298 | 1300 |
1299 } // namespace internal | 1301 } // namespace internal |
1300 } // namespace v8 | 1302 } // namespace v8 |
1301 | 1303 |
1302 #endif // V8_PARSING_PARSER_H_ | 1304 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |