| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index c255285e9f67b2a7ec826d1505beabee38ac85a7..963edcc7ab0c6bb15cbcf6873803c31ff012053d 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -35,7 +35,7 @@ namespace internal {
|
| #define DUMMY ) // to make indentation work
|
| #undef DUMMY
|
|
|
| -#define CHECK_OK CHECK_OK_VALUE(Statement::Default())
|
| +#define CHECK_OK CHECK_OK_VALUE(Expression::Default())
|
| #define CHECK_OK_VOID CHECK_OK_VALUE(this->Void())
|
|
|
| namespace {
|
| @@ -135,29 +135,6 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
|
| // That means that contextual checks (like a label being declared where
|
| // it is used) are generally omitted.
|
|
|
| -PreParser::Statement PreParser::ParseFunctionDeclaration(bool* ok) {
|
| - Consume(Token::FUNCTION);
|
| - int pos = position();
|
| - ParseFunctionFlags flags = ParseFunctionFlags::kIsNormal;
|
| - if (Check(Token::MUL)) {
|
| - flags |= ParseFunctionFlags::kIsGenerator;
|
| - if (allow_harmony_restrictive_declarations()) {
|
| - ReportMessageAt(scanner()->location(),
|
| - MessageTemplate::kGeneratorInLegacyContext);
|
| - *ok = false;
|
| - return Statement::Default();
|
| - }
|
| - }
|
| - // PreParser is not able to parse "export default" yet (since PreParser is
|
| - // at the moment only used for functions, and it cannot occur
|
| - // there). TODO(marja): update this when it is.
|
| - return ParseHoistableDeclaration(pos, flags, nullptr, false, ok);
|
| -}
|
| -
|
| -// Redefinition of CHECK_OK for parsing expressions.
|
| -#undef CHECK_OK
|
| -#define CHECK_OK CHECK_OK_VALUE(Expression::Default())
|
| -
|
| PreParser::Expression PreParser::ParseFunctionLiteral(
|
| Identifier function_name, Scanner::Location function_name_location,
|
| FunctionNameValidity function_name_validity, FunctionKind kind,
|
|
|