Index: src/parsing/parser.h |
diff --git a/src/parsing/parser.h b/src/parsing/parser.h |
index 860960d129c6b81005e73313348f237cf1704237..4001a16a21e4a308b905a812e3b59b73ee463a5e 100644 |
--- a/src/parsing/parser.h |
+++ b/src/parsing/parser.h |
@@ -287,7 +287,6 @@ class Parser : public ParserBase<Parser> { |
bool is_generator, bool is_async, |
ZoneList<const AstRawString*>* names, bool* ok); |
- DoExpression* ParseDoExpression(bool* ok); |
Expression* ParseYieldStarExpression(bool* ok); |
class PatternRewriter final : public AstVisitor<PatternRewriter> { |
@@ -374,12 +373,7 @@ class Parser : public ParserBase<Parser> { |
CaseClause* ParseCaseClause(bool* default_seen_ptr, bool* ok); |
Statement* ParseSwitchStatement(ZoneList<const AstRawString*>* labels, |
bool* ok); |
- DoWhileStatement* ParseDoWhileStatement(ZoneList<const AstRawString*>* labels, |
- bool* ok); |
- WhileStatement* ParseWhileStatement(ZoneList<const AstRawString*>* labels, |
- bool* ok); |
Statement* ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok); |
- Statement* ParseThrowStatement(bool* ok); |
Expression* MakeCatchContext(Handle<String> id, VariableProxy* value); |
TryStatement* ParseTryStatement(bool* ok); |
@@ -407,7 +401,7 @@ class Parser : public ParserBase<Parser> { |
FunctionKind kind, FunctionBodyType type, |
bool accept_IN, int pos, bool* ok); |
- void RewriteDoExpression(Expression* expr, bool* ok); |
+ Expression* RewriteDoExpression(Block* body, int pos, bool* ok); |
FunctionLiteral* ParseFunctionLiteral( |
const AstRawString* name, Scanner::Location function_name_location, |
@@ -955,6 +949,11 @@ class Parser : public ParserBase<Parser> { |
ZoneList<Expression*>* args, int pos, |
bool* ok); |
+ V8_INLINE Statement* NewThrowStatement(Expression* exception, int pos) { |
+ return factory()->NewExpressionStatement( |
+ factory()->NewThrow(exception, pos), pos); |
+ } |
+ |
V8_INLINE void AddParameterInitializationBlock( |
const ParserFormalParameters& parameters, ZoneList<Statement*>* body, |
bool is_async, bool* ok) { |