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

Unified Diff: src/parser.h

Issue 1399893002: [es7] implement |do| expressions proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AST numbering issue + add simple TF impl Created 5 years, 2 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
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 569236c593df736db2dc3786f327019b16fa4b80..44895efed4ea45215a19a5bc5430c380ac4aa481 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -813,12 +813,16 @@ class ParserTraits {
const AstRawString* name, int pos,
const ParserFormalParameters& parameters, FunctionKind kind,
FunctionLiteral::FunctionType function_type, bool* ok);
+ V8_INLINE ZoneList<Statement*>* ParseStatementList(Token::Value end_token,
+ bool* ok);
ClassLiteral* ParseClassLiteral(const AstRawString* name,
Scanner::Location class_name_location,
bool name_is_strict_reserved, int pos,
bool* ok);
+ inline void RewriteDoExpression(Expression* expr, bool* ok);
+
V8_INLINE void CheckConflictingVarDeclarations(v8::internal::Scope* scope,
bool* ok);
@@ -1104,6 +1108,8 @@ class Parser : public ParserBase<ParserTraits> {
ForStatement* loop, Statement* init, Expression* cond, Statement* next,
Statement* body, bool* ok);
+ void RewriteDoExpression(Expression* expr, bool* ok);
+
FunctionLiteral* ParseFunctionLiteral(
const AstRawString* name, Scanner::Location function_name_location,
FunctionNameValidity function_name_validity, FunctionKind kind,
@@ -1248,6 +1254,16 @@ ZoneList<Statement*>* ParserTraits::ParseEagerFunctionBody(
function_type, ok);
}
+
+ZoneList<Statement*>* ParserTraits::ParseStatementList(Token::Value end_token,
+ bool* ok) {
+ ZoneList<Statement*>* statements =
+ new (parser_->zone()) ZoneList<Statement*>(16, parser_->zone());
+ parser_->ParseStatementList(statements, end_token, ok);
+ return statements;
+}
+
+
void ParserTraits::CheckConflictingVarDeclarations(v8::internal::Scope* scope,
bool* ok) {
parser_->CheckConflictingVarDeclarations(scope, ok);
@@ -1377,6 +1393,13 @@ void ParserTraits::AddParameterInitializationBlock(
}
}
}
+
+
+void ParserTraits::RewriteDoExpression(Expression* expr, bool* ok) {
+ return parser_->RewriteDoExpression(expr, ok);
+}
+
+
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698