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

Unified Diff: src/parsing/parser-base.h

Issue 2345103003: [parser] Minor cleanup after refactoring (Closed)
Patch Set: 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.h ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index e9a683488b8c0b7728b006fe882dbd01eb825985..7d751dd05b31446d7e2c861d4ad46dec7f18f46a 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -3591,8 +3591,8 @@ typename ParserBase<Impl>::BlockT ParserBase<Impl>::ParseVariableDeclarations(
BlockT init_block = impl()->NullBlock();
if (var_context != kForStatement) {
- init_block = impl()->NewBlock(nullptr, 1, true,
- parsing_result->descriptor.declaration_pos);
+ init_block = factory()->NewBlock(
+ nullptr, 1, true, parsing_result->descriptor.declaration_pos);
}
switch (peek()) {
@@ -4194,8 +4194,8 @@ ParserBase<Impl>::ParseStatementList(StatementListT body, int end_token,
bool starts_with_identifier = peek() == Token::IDENTIFIER;
Scanner::Location token_loc = scanner()->peek_location();
- StatementT stat = impl()->ParseStatementListItem(
- CHECK_OK_CUSTOM(Return, kLazyParsingComplete));
+ StatementT stat =
+ ParseStatementListItem(CHECK_OK_CUSTOM(Return, kLazyParsingComplete));
if (impl()->IsNullStatement(stat) || impl()->IsEmptyStatement(stat)) {
directive_prologue = false; // End of directive prologue.
@@ -4233,18 +4233,15 @@ ParserBase<Impl>::ParseStatementList(StatementListT body, int end_token,
impl()->SetAsmModule();
} else if (impl()->IsStringLiteral(stat)) {
// Possibly an unknown directive.
- // TODO(nikolaos): Check if the following is really what we want!
- // """Should not change mode, but will increment UseCounter
- // if appropriate. Ditto usages below.""" ???
+ // Should not change mode, but will increment usage counters
+ // as appropriate. Ditto usages below.
RaiseLanguageMode(SLOPPY);
} else {
// End of the directive prologue.
directive_prologue = false;
- // TODO(nikolaos): Check if the following is really what we want!
RaiseLanguageMode(SLOPPY);
}
} else {
- // TODO(nikolaos): Check if the following is really what we want!
RaiseLanguageMode(SLOPPY);
}
@@ -4287,7 +4284,7 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseStatementListItem(
switch (peek()) {
case Token::FUNCTION:
- return impl()->ParseHoistableDeclaration(nullptr, false, ok);
+ return ParseHoistableDeclaration(nullptr, false, ok);
case Token::CLASS:
Consume(Token::CLASS);
return impl()->ParseClassDeclaration(nullptr, false, ok);
@@ -4309,7 +4306,7 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseStatementListItem(
default:
break;
}
- return impl()->ParseStatement(nullptr, kAllowLabelledFunctionStatement, ok);
+ return ParseStatement(nullptr, kAllowLabelledFunctionStatement, ok);
}
template <typename Impl>
@@ -4341,7 +4338,7 @@ typename ParserBase<Impl>::StatementT ParserBase<Impl>::ParseStatement(
// parsed into an empty statement.
switch (peek()) {
case Token::LBRACE:
- return impl()->ParseBlock(labels, ok);
+ return ParseBlock(labels, ok);
case Token::SEMICOLON:
Next();
return factory()->NewEmptyStatement(kNoSourcePosition);
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698