Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: src/parsing/parser.h

Issue 2321103002: [parser] Refactor of Parse*Statement*, part 5 (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698