| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 1366041387215bc4c018c4b1650d39ff5f6549c4..6e9390f6e3f62ebfe9d168b25993ffb0fef3a47c 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -88,7 +88,8 @@ namespace internal {
|
| V(ThisFunction) \
|
| V(SuperPropertyReference) \
|
| V(SuperCallReference) \
|
| - V(CaseClause)
|
| + V(CaseClause) \
|
| + V(EmptyParentheses)
|
|
|
| #define AST_NODE_LIST(V) \
|
| DECLARATION_NODE_LIST(V) \
|
| @@ -2848,6 +2849,17 @@ class SuperCallReference final : public Expression {
|
| };
|
|
|
|
|
| +// This class is produced when parsing the () in arrow functions without any
|
| +// arguments and is not actually a valid expression.
|
| +class EmptyParentheses final : public Expression {
|
| + public:
|
| + DECLARE_NODE_TYPE(EmptyParentheses)
|
| +
|
| + private:
|
| + EmptyParentheses(Zone* zone, int pos) : Expression(zone, pos) {}
|
| +};
|
| +
|
| +
|
| #undef DECLARE_NODE_TYPE
|
|
|
|
|
| @@ -3633,6 +3645,10 @@ class AstNodeFactory final BASE_EMBEDDED {
|
| this_function_var, pos);
|
| }
|
|
|
| + EmptyParentheses* NewEmptyParentheses(int pos) {
|
| + return new (zone_) EmptyParentheses(zone_, pos);
|
| + }
|
| +
|
| private:
|
| Zone* zone_;
|
| AstValueFactory* ast_value_factory_;
|
|
|