Chromium Code Reviews| Index: src/ast/ast.h |
| diff --git a/src/ast/ast.h b/src/ast/ast.h |
| index 3705b2d8404af47c1b027e28d665adebfac2d121..faaaa70955cd4d9ea0044f63f724b51a984fda45 100644 |
| --- a/src/ast/ast.h |
| +++ b/src/ast/ast.h |
| @@ -105,7 +105,8 @@ namespace internal { |
| V(EmptyParentheses) \ |
| V(GetIterator) \ |
| V(DoExpression) \ |
| - V(RewritableExpression) |
| + V(RewritableExpression) \ |
| + V(ImportCallExpression) |
| #define AST_NODE_LIST(V) \ |
| DECLARATION_NODE_LIST(V) \ |
| @@ -2921,6 +2922,19 @@ class SuperCallReference final : public Expression { |
| VariableProxy* this_function_var_; |
| }; |
| +class ImportCallExpression final : public Expression { |
|
adamk
2017/03/15 21:36:43
Please add a comment for this.
gsathya
2017/03/16 00:59:24
Feel free to suggest something more comprehensive.
|
| + public: |
| + Expression* arg() const { return arg_; } |
|
adamk
2017/03/15 21:36:43
Please use a full word here, "argument". Same for
gsathya
2017/03/16 00:59:24
Done.
|
| + void set_arg(Expression* arg) { arg_ = arg; } |
| + |
| + private: |
| + friend class AstNodeFactory; |
| + |
| + ImportCallExpression(Expression* arg, int pos) |
| + : Expression(pos, kImportCallExpression), arg_(arg) {} |
| + |
| + Expression* arg_; |
| +}; |
| // This class is produced when parsing the () in arrow functions without any |
| // arguments and is not actually a valid expression. |
| @@ -3569,6 +3583,10 @@ class AstNodeFactory final BASE_EMBEDDED { |
| return new (zone_) GetIterator(iterable, hint, pos); |
| } |
| + ImportCallExpression* NewImportCallExpression(Expression* args, int pos) { |
| + return new (zone_) ImportCallExpression(args, pos); |
| + } |
| + |
| Zone* zone() const { return zone_; } |
| void set_zone(Zone* zone) { zone_ = zone; } |