I know this is a really long shot, but I figure I'd ask: Is there a way to to find the names of the variables passed as parameters in a function call?
Assuming I have:
function test(tmp1, tmp2) {
// ...
}
var a;
var b;
test(a, b);
I'd like to get an array like so: [a, b]
. Strings would also be acceptable: ["a", "b"]
.
I do not want ["tmp1", "tmp2"]
, which I know I can get by parsing the string representation of the function.
I'm asking because I'm trying to to improve my caseclass.js library with real extractors (see the link for more information). I understand that only objects are passed by reference, so I'm trying to find a work around to pass the values extracted back to the placeholder variables.
Thanks!