Currently we only support function declarations in FuzzIL, i.e. something like
But not
let foo = function() {
...
}
For the most part, it doesn't really matter whether we emit function statements or expressions, but in certain situations the difference is observable, for example here:
let x = function foo(n) {
if (n == 0) return;
foo(n-1);
}
x(10);
I'm not sure how best to support this. Probably the easiest way would be to simply add a boolean flag to BeginAnyFunctionDefinition that states whether the function should become an expression or a statement.
Currently we only support function declarations in FuzzIL, i.e. something like
But not
For the most part, it doesn't really matter whether we emit function statements or expressions, but in certain situations the difference is observable, for example here:
I'm not sure how best to support this. Probably the easiest way would be to simply add a boolean flag to BeginAnyFunctionDefinition that states whether the function should become an expression or a statement.