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" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 // | 791 // |
792 // function f() { { { var x; } let x; } } | 792 // function f() { { { var x; } let x; } } |
793 // function g() { { var x; let x; } } | 793 // function g() { { var x; let x; } } |
794 // | 794 // |
795 // The var declarations are hoisted to the function scope, but originate from | 795 // The var declarations are hoisted to the function scope, but originate from |
796 // a scope where the name has also been let bound or the var declaration is | 796 // a scope where the name has also been let bound or the var declaration is |
797 // hoisted over such a scope. | 797 // hoisted over such a scope. |
798 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); | 798 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); |
799 | 799 |
800 // Parser support | 800 // Parser support |
801 VariableProxy* NewUnresolved(const AstRawString* name, | 801 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
802 VariableMode mode, | |
803 Interface* interface); | |
804 void Declare(Declaration* declaration, bool resolve, bool* ok); | 802 void Declare(Declaration* declaration, bool resolve, bool* ok); |
805 | 803 |
806 bool TargetStackContainsLabel(const AstRawString* label); | 804 bool TargetStackContainsLabel(const AstRawString* label); |
807 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 805 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
808 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 806 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
809 | 807 |
810 void AddAssertIsConstruct(ZoneList<Statement*>* body, int pos); | 808 void AddAssertIsConstruct(ZoneList<Statement*>* body, int pos); |
811 | 809 |
812 // Factory methods. | 810 // Factory methods. |
813 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, | 811 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 } | 947 } |
950 | 948 |
951 | 949 |
952 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, | 950 Expression* ParserTraits::CloseTemplateLiteral(TemplateLiteralState* state, |
953 int start, Expression* tag) { | 951 int start, Expression* tag) { |
954 return parser_->CloseTemplateLiteral(state, start, tag); | 952 return parser_->CloseTemplateLiteral(state, start, tag); |
955 } | 953 } |
956 } } // namespace v8::internal | 954 } } // namespace v8::internal |
957 | 955 |
958 #endif // V8_PARSER_H_ | 956 #endif // V8_PARSER_H_ |
OLD | NEW |