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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 DoWhileStatement* ParseDoWhileStatement(ZoneList<const AstRawString*>* labels, | 1079 DoWhileStatement* ParseDoWhileStatement(ZoneList<const AstRawString*>* labels, |
1080 bool* ok); | 1080 bool* ok); |
1081 WhileStatement* ParseWhileStatement(ZoneList<const AstRawString*>* labels, | 1081 WhileStatement* ParseWhileStatement(ZoneList<const AstRawString*>* labels, |
1082 bool* ok); | 1082 bool* ok); |
1083 Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok); | 1083 Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok); |
1084 Statement* ParseThrowStatement(bool* ok); | 1084 Statement* ParseThrowStatement(bool* ok); |
1085 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); | 1085 Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); |
1086 TryStatement* ParseTryStatement(bool* ok); | 1086 TryStatement* ParseTryStatement(bool* ok); |
1087 DebuggerStatement* ParseDebuggerStatement(bool* ok); | 1087 DebuggerStatement* ParseDebuggerStatement(bool* ok); |
1088 | 1088 |
1089 // Support for hamony block scoped bindings. | |
1090 Block* ParseScopedBlock(ZoneList<const AstRawString*>* labels, bool* ok); | |
1091 | |
1092 // !%_IsSpecObject(result = iterator.next()) && | 1089 // !%_IsSpecObject(result = iterator.next()) && |
1093 // %ThrowIteratorResultNotAnObject(result) | 1090 // %ThrowIteratorResultNotAnObject(result) |
1094 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result, | 1091 Expression* BuildIteratorNextResult(Expression* iterator, Variable* result, |
1095 int pos); | 1092 int pos); |
1096 | 1093 |
1097 | 1094 |
1098 // Initialize the components of a for-in / for-of statement. | 1095 // Initialize the components of a for-in / for-of statement. |
1099 void InitializeForEachStatement(ForEachStatement* stmt, | 1096 void InitializeForEachStatement(ForEachStatement* stmt, |
1100 Expression* each, | 1097 Expression* each, |
1101 Expression* subject, | 1098 Expression* subject, |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 | 1384 |
1388 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1385 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1389 return parser_->ParseDoExpression(ok); | 1386 return parser_->ParseDoExpression(ok); |
1390 } | 1387 } |
1391 | 1388 |
1392 | 1389 |
1393 } // namespace internal | 1390 } // namespace internal |
1394 } // namespace v8 | 1391 } // namespace v8 |
1395 | 1392 |
1396 #endif // V8_PARSER_H_ | 1393 #endif // V8_PARSER_H_ |
OLD | NEW |