Index: src/preparser.cc |
diff --git a/src/preparser.cc b/src/preparser.cc |
index ecf4a950c0ea8e76192e205020de4713bafb5f40..74e11b1d454b3b33a3f6bcadb18f91476a246f37 100644 |
--- a/src/preparser.cc |
+++ b/src/preparser.cc |
@@ -1239,6 +1239,23 @@ PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) { |
return Expression::Default(); |
} |
+ |
+PreParserExpression PreParser::ParseDoExpression(bool* ok) { |
+ // AssignmentExpression :: |
+ // do '{' StatementList '}' |
+ Expect(Token::DO, CHECK_OK); |
+ Expect(Token::LBRACE, CHECK_OK); |
+ Scope* block_scope = NewScope(scope_, BLOCK_SCOPE); |
+ { |
+ BlockState block_state(&scope_, block_scope); |
+ while (peek() != Token::RBRACE) { |
+ ParseStatementListItem(CHECK_OK); |
+ } |
+ Expect(Token::RBRACE, CHECK_OK); |
+ return PreParserExpression::Default(); |
+ } |
+} |
+ |
#undef CHECK_OK |