Accessing function AST from scope in compile.js

26 views
Skip to first unread message

Andreas Hartmann

unread,
Oct 15, 2013, 7:44:09 AM10/15/13
to roy...@googlegroups.com
Hi everyone,

is it possible to lookup a function node in the current scope of the AST in compile.js?

         // Call to JavaScript call.
        visitCall: function() {

            var func = n.func.value
               ? getFunctionNode(n.func.value) // <- ???
               : undefined;
            if (func && func.types.length - 1 > args.length) …

Thanks in advance for any advice!

-- Andreas

Andreas Hartmann

unread,
Oct 21, 2013, 4:46:03 PM10/21/13
to roy...@googlegroups.com
For the moment I have added the information on the deferred types to the AST node during type inference. Probably not the cleanest way, but it works until I find a better solution.
Reply all
Reply to author
Forward
0 new messages