Skip to content

Commit 7e635c6

Browse files
committed
jme.findvars includes names of unknown functions
When a lambda function is used by name, its name should show up as a variable used by the expression.
1 parent 21ccfe7 commit 7e635c6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

runtime/scripts/jme.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4290,7 +4290,11 @@ var findvars = jme.findvars = function(tree,boundvars,scope) {
42904290
return [];
42914291
}
42924292
} else {
4293-
return jme.findvars_args(tree.args, boundvars, scope);
4293+
var argvars = jme.findvars_args(tree.args, boundvars, scope);
4294+
if(tree.tok.type == 'function' && scope.getFunction(tree.tok.name).length == 0) {
4295+
argvars.push(tree.tok.name);
4296+
}
4297+
return argvars;
42944298
}
42954299
}
42964300

0 commit comments

Comments
 (0)