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

Unified Diff: src/parsing/preparser.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 | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.h
diff --git a/src/parsing/preparser.h b/src/parsing/preparser.h
index 9ba67930351315717b1f0ac09b824dc0e2e669d1..4e7598fff4e1a98de42a6de310c4792db165da1f 100644
--- a/src/parsing/preparser.h
+++ b/src/parsing/preparser.h
@@ -448,6 +448,7 @@ class PreParserStatement {
PreParserStatementList statements() { return PreParserStatementList(); }
void set_scope(Scope* scope) {}
+ void Initialize(PreParserExpression cond, PreParserStatement body) {}
private:
enum Type {
@@ -640,6 +641,16 @@ class PreParserFactory {
return PreParserStatement::Default();
}
+ PreParserStatement NewDoWhileStatement(ZoneList<const AstRawString*>* labels,
+ int pos) {
+ return PreParserStatement::Default();
+ }
+
+ PreParserStatement NewWhileStatement(ZoneList<const AstRawString*>* labels,
+ int pos) {
+ return PreParserStatement::Default();
+ }
+
// Return the object itself as AstVisitor and implement the needed
// dummy method right in this class.
PreParserFactory* visitor() { return this; }
@@ -805,16 +816,10 @@ class PreParser : public ParserBase<PreParser> {
bool default_export, bool* ok);
Statement ParseSwitchStatement(ZoneList<const AstRawString*>* labels,
bool* ok);
- Statement ParseDoWhileStatement(ZoneList<const AstRawString*>* labels,
- bool* ok);
- Statement ParseWhileStatement(ZoneList<const AstRawString*>* labels,
- bool* ok);
Statement ParseForStatement(ZoneList<const AstRawString*>* labels, bool* ok);
- Statement ParseThrowStatement(bool* ok);
Statement ParseTryStatement(bool* ok);
Expression ParseConditionalExpression(bool accept_IN, bool* ok);
Expression ParseObjectLiteral(bool* ok);
- Expression ParseDoExpression(bool* ok);
V8_INLINE PreParserStatementList ParseEagerFunctionBody(
PreParserIdentifier function_name, int pos,
@@ -929,6 +934,11 @@ class PreParser : public ParserBase<PreParser> {
return return_value;
}
+ V8_INLINE PreParserExpression RewriteDoExpression(PreParserStatement body,
+ int pos, bool* ok) {
+ return PreParserExpression::Default();
+ }
+
// TODO(nikolaos): The preparser currently does not keep track of labels
// and targets.
V8_INLINE PreParserStatement LookupBreakTarget(PreParserIdentifier label,
@@ -1258,6 +1268,11 @@ class PreParser : public ParserBase<PreParser> {
return PreParserExpression::Default();
}
+ V8_INLINE PreParserStatement NewThrowStatement(PreParserExpression exception,
+ int pos) {
+ return PreParserStatement::Jump();
+ }
+
V8_INLINE void AddParameterInitializationBlock(
const PreParserFormalParameters& parameters, PreParserStatementList body,
bool is_async, bool* ok) {}
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/parsing/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698