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" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 // Parser support | 1147 // Parser support |
1148 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); | 1148 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
1149 Variable* Declare(Declaration* declaration, | 1149 Variable* Declare(Declaration* declaration, |
1150 DeclarationDescriptor::Kind declaration_kind, bool resolve, | 1150 DeclarationDescriptor::Kind declaration_kind, bool resolve, |
1151 bool* ok, Scope* declaration_scope = nullptr); | 1151 bool* ok, Scope* declaration_scope = nullptr); |
1152 | 1152 |
1153 bool TargetStackContainsLabel(const AstRawString* label); | 1153 bool TargetStackContainsLabel(const AstRawString* label); |
1154 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); | 1154 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
1155 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); | 1155 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |
1156 | 1156 |
1157 void AddAssertIsConstruct(ZoneList<Statement*>* body, int pos); | |
1158 Statement* BuildAssertIsCoercible(Variable* var); | 1157 Statement* BuildAssertIsCoercible(Variable* var); |
1159 | 1158 |
1160 // Factory methods. | 1159 // Factory methods. |
1161 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, | 1160 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, |
1162 int end_pos, LanguageMode language_mode); | 1161 int end_pos, LanguageMode language_mode); |
1163 | 1162 |
1164 // Skip over a lazy function, either using cached data if we have it, or | 1163 // Skip over a lazy function, either using cached data if we have it, or |
1165 // by parsing the function with PreParser. Consumes the ending }. | 1164 // by parsing the function with PreParser. Consumes the ending }. |
1166 // | 1165 // |
1167 // If bookmark is set, the (pre-)parser may decide to abort skipping | 1166 // If bookmark is set, the (pre-)parser may decide to abort skipping |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 | 1384 |
1386 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1385 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1387 return parser_->ParseDoExpression(ok); | 1386 return parser_->ParseDoExpression(ok); |
1388 } | 1387 } |
1389 | 1388 |
1390 | 1389 |
1391 } // namespace internal | 1390 } // namespace internal |
1392 } // namespace v8 | 1391 } // namespace v8 |
1393 | 1392 |
1394 #endif // V8_PARSER_H_ | 1393 #endif // V8_PARSER_H_ |
OLD | NEW |