thanks to john i got the following script

for (var foo in this)
{
   if (this[foo] == arguments.callee)
   {
      functionName = foo;
      break;
   }
}

however i m still a bit confused

1) i was expecting some API i to get the NAMENODE type from the parser
tree? i mean the function name has to exist in the parser tree? when
it parses the char ":"?
2) with the above script, does it mean i have to create a new script
object, and compile/evaluate it?
3) to get the function body, it seems like i should use getLineNumbers
(), sort it, then substring the encoded source with 1st and last
element and decompile the encoded source?.  this is all done under the
hood in parser.compileString, so should i even use debuggableScript
object since it doesnt have a getter for encoded source?

thanks in advance for all the help
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to