On 07/11/2017 04:02 AM, Tim Blechmann wrote:
On the other hand, I have good news as I think I have found a way to
simulate functions that return a function.
how to you cope with structures like:
function foo( outObject )
{
var object = {}
outObject.object = object
outObject.result = function() { return object }
return function() { return bar( object ) }
}
I just manually wrote an emulation of Javascript code in C++ here:
https://github.com/philippeb8/root_ptr/blob/qt/example/javascript_example1.cpp
And I have the following output:
int main(): BEGIN
main()::__lambda1
main()::__lambda1::__lambda3
main()::__lambda0
int main(): END
Note that I just realized it's impossible the variable lookups in
Javascript are instantaneous and it must be done the way it's done in my
example because it's all run-time in the Javascript engine.
Thanks,
-Phil
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development