Index: src/preparser.cc |
diff --git a/src/preparser.cc b/src/preparser.cc |
index c01acddebdea61e4ad3974a5372a3f5608c7a364..3c184901aeab37220334305898214abe542ea0b3 100644 |
--- a/src/preparser.cc |
+++ b/src/preparser.cc |
@@ -65,6 +65,11 @@ bool PreParserTraits::is_generator() const { |
} |
+int PreParserTraits::NextMaterializedLiteralIndex() { |
+ return pre_parser_->scope_->NextMaterializedLiteralIndex(); |
+} |
+ |
+ |
void PreParserTraits::ReportMessageAt(Scanner::Location location, |
const char* message, |
Vector<const char*> args) { |
@@ -1301,28 +1306,6 @@ PreParser::Expression PreParser::ParseObjectLiteral(bool* ok) { |
} |
-PreParser::Expression PreParser::ParseRegExpLiteral(bool seen_equal, |
- bool* ok) { |
- if (!scanner()->ScanRegExpPattern(seen_equal)) { |
- Next(); |
- ReportMessageAt(scanner()->location(), "unterminated_regexp"); |
- *ok = false; |
- return Expression::Default(); |
- } |
- |
- scope_->NextMaterializedLiteralIndex(); |
- |
- if (!scanner()->ScanRegExpFlags()) { |
- Next(); |
- ReportMessageAt(scanner()->location(), "invalid_regexp_flags"); |
- *ok = false; |
- return Expression::Default(); |
- } |
- Next(); |
- return Expression::Default(); |
-} |
- |
- |
PreParser::Arguments PreParser::ParseArguments(bool* ok) { |
// Arguments :: |
// '(' (AssignmentExpression)*[','] ')' |