diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-06 21:22:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 05:22:40 +0800 |
commit | 2cbbf5c375a0fae88345c3ed3bc2829b4b1ac250 (patch) | |
tree | f1dd106d04820e8002d2f99cba76206d690d7c96 /lib/scope.js | |
parent | 3c384cf9a8ed4230cf87f14ab017b613b38df628 (diff) | |
download | tracifyjs-2cbbf5c375a0fae88345c3ed3bc2829b4b1ac250.tar.gz tracifyjs-2cbbf5c375a0fae88345c3ed3bc2829b4b1ac250.zip |
support async function (#4333)
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js index 4d080fee..c1bbc086 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -112,7 +112,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) { var next_def_id = 0; var scope = self.parent_scope = null; var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Defun) { + if (node instanceof AST_AsyncDefun || node instanceof AST_Defun) { node.name.walk(tw); walk_scope(function() { node.argnames.forEach(function(argname) { |