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

Unified Diff: src/preparser.cc

Issue 206433003: Move ParseLeftHandSideExpression to ParserBase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: code review Created 6 years, 9 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/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 9480af6fbad0db414152485a00c482df211ef140..9473701a04f0b116288de8044cfe587bddd756b5 100644
--- a/src/preparser.cc
+++ b/src/preparser.cc
@@ -146,8 +146,9 @@ PreParserExpression PreParserTraits::ParseFunctionLiteral(
}
-PreParserExpression PreParserTraits::ParseLeftHandSideExpression(bool* ok) {
- return pre_parser_->ParseLeftHandSideExpression(ok);
+PreParserExpression PreParserTraits::ParseMemberWithNewPrefixesExpression(
+ bool* ok) {
+ return pre_parser_->ParseMemberWithNewPrefixesExpression(ok);
}
@@ -842,50 +843,6 @@ PreParser::Statement PreParser::ParseDebuggerStatement(bool* ok) {
#undef DUMMY
-PreParser::Expression PreParser::ParseLeftHandSideExpression(bool* ok) {
- // LeftHandSideExpression ::
- // (NewExpression | MemberExpression) ...
-
- Expression result = ParseMemberWithNewPrefixesExpression(CHECK_OK);
-
- while (true) {
- switch (peek()) {
- case Token::LBRACK: {
- Consume(Token::LBRACK);
- ParseExpression(true, CHECK_OK);
- Expect(Token::RBRACK, CHECK_OK);
- if (result.IsThis()) {
- result = Expression::ThisProperty();
- } else {
- result = Expression::Property();
- }
- break;
- }
-
- case Token::LPAREN: {
- ParseArguments(CHECK_OK);
- result = Expression::Default();
- break;
- }
-
- case Token::PERIOD: {
- Consume(Token::PERIOD);
- ParseIdentifierName(CHECK_OK);
- if (result.IsThis()) {
- result = Expression::ThisProperty();
- } else {
- result = Expression::Property();
- }
- break;
- }
-
- default:
- return result;
- }
- }
-}
-
-
PreParser::Expression PreParser::ParseMemberWithNewPrefixesExpression(
bool* ok) {
// NewExpression ::
« no previous file with comments | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698