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

Unified Diff: src/preparser.h

Issue 905003003: Rename ParseSourceElements in preparser too (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove kUnknownSourceElements 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
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 982273f447482dc042a4c0d02f2702050b78702e..b16e3df6acb60c6b9aeba19b098dff4cf05f6368 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -1564,7 +1564,7 @@ class PreParser : public ParserBase<PreParserTraits> {
&factory);
bool ok = true;
int start_position = scanner()->peek_location().beg_pos;
- ParseSourceElements(Token::EOS, &ok);
+ ParseStatementList(Token::EOS, &ok);
if (stack_overflow()) return kPreParseStackOverflow;
if (!ok) {
ReportUnexpectedToken(scanner()->current_token());
@@ -1609,17 +1609,12 @@ class PreParser : public ParserBase<PreParserTraits> {
kHasNoInitializers
};
-
- enum SourceElements {
- kUnknownSourceElements
- };
-
// All ParseXXX functions take as the last argument an *ok parameter
// which is set to false if parsing failed; it is unchanged otherwise.
// By making the 'exception handling' explicit, we are forced to check
// for failure at the call sites.
- Statement ParseSourceElement(bool* ok);
- SourceElements ParseSourceElements(int end_token, bool* ok);
+ Statement ParseStatementListItem(bool* ok);
+ void ParseStatementList(int end_token, bool* ok);
Statement ParseStatement(bool* ok);
Statement ParseFunctionDeclaration(bool* ok);
Statement ParseClassDeclaration(bool* ok);
@@ -1682,7 +1677,7 @@ PreParserStatementList PreParser::ParseEagerFunctionBody(
Token::Value fvar_init_op, FunctionKind kind, bool* ok) {
ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
- ParseSourceElements(Token::RBRACE, ok);
+ ParseStatementList(Token::RBRACE, ok);
if (!*ok) return PreParserStatementList();
Expect(Token::RBRACE, ok);
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698