diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-02-13 20:26:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-14 04:26:43 +0800 |
commit | b7219ac489e47091f17091a08d7ef50980d68972 (patch) | |
tree | c46da154cf918ec3573ddb9b4dfd9df244919556 /lib/transform.js | |
parent | a6bb66931bfdd04d6ce05b640d89a8deff7ca3de (diff) | |
download | tracifyjs-b7219ac489e47091f17091a08d7ef50980d68972.tar.gz tracifyjs-b7219ac489e47091f17091a08d7ef50980d68972.zip |
support `import` statements (#4646)
Diffstat (limited to 'lib/transform.js')
-rw-r--r-- | lib/transform.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/transform.js b/lib/transform.js index 716fb148..b6a0295a 100644 --- a/lib/transform.js +++ b/lib/transform.js @@ -204,6 +204,11 @@ TreeTransformer.prototype = new TreeWalker; if (self.key instanceof AST_Node) self.key = self.key.transform(tw); self.value = self.value.transform(tw); }); + DEF(AST_Import, function(self, tw) { + if (self.all) self.all = self.all.transform(tw); + if (self.default) self.default = self.default.transform(tw); + if (self.properties) self.properties = do_list(self.properties, tw); + }); DEF(AST_Template, function(self, tw) { if (self.tag) self.tag = self.tag.transform(tw); self.expressions = do_list(self.expressions, tw); |