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

Unified Diff: src/preparser.cc

Issue 905003003: Rename ParseSourceElements in preparser too (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« src/preparser.h ('K') | « src/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.cc
diff --git a/src/preparser.cc b/src/preparser.cc
index 3617bb23ca9964b44f2a5e00c8069cae60e9af15..2f8ca5d0ebe70239981fad663350f587b876f06c 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -163,7 +163,7 @@ PreParserExpression PreParserTraits::ParseClassLiteral(
#undef DUMMY
-PreParser::Statement PreParser::ParseSourceElement(bool* ok) {
+PreParser::Statement PreParser::ParseStatementListItem(bool* ok) {
// ECMA 262 6th Edition
// StatementListItem[Yield, Return] :
// Statement[?Yield, ?Return]
@@ -200,8 +200,8 @@ PreParser::Statement PreParser::ParseSourceElement(bool* ok) {
}
-PreParser::SourceElements PreParser::ParseSourceElements(int end_token,
- bool* ok) {
+PreParser::SourceElements PreParser::ParseStatementList(int end_token,
+ bool* ok) {
// SourceElements ::
// (Statement)* <end_token>
@@ -210,7 +210,7 @@ PreParser::SourceElements PreParser::ParseSourceElements(int end_token,
if (directive_prologue && peek() != Token::STRING) {
directive_prologue = false;
}
- Statement statement = ParseSourceElement(CHECK_OK);
+ Statement statement = ParseStatementListItem(CHECK_OK);
if (directive_prologue) {
if (statement.IsUseStrictLiteral()) {
scope_->SetLanguageMode(
@@ -387,7 +387,7 @@ PreParser::Statement PreParser::ParseBlock(bool* ok) {
Expect(Token::LBRACE, CHECK_OK);
while (peek() != Token::RBRACE) {
if (allow_harmony_scoping() && is_strict(language_mode())) {
- ParseSourceElement(CHECK_OK);
+ ParseStatementListItem(CHECK_OK);
} else {
ParseStatement(CHECK_OK);
}
@@ -932,7 +932,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
if (is_lazily_parsed) {
ParseLazyFunctionLiteralBody(CHECK_OK);
} else {
- ParseSourceElements(Token::RBRACE, ok);
+ ParseStatementList(Token::RBRACE, ok);
}
Expect(Token::RBRACE, CHECK_OK);
@@ -956,7 +956,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
void PreParser::ParseLazyFunctionLiteralBody(bool* ok) {
int body_start = position();
- ParseSourceElements(Token::RBRACE, ok);
+ ParseStatementList(Token::RBRACE, ok);
if (!*ok) return;
// Position right after terminal '}'.
« src/preparser.h ('K') | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698