Hello,

I'm new to rhino and have a question:

I have a script source containing many functions, for example:

function sum(a, b) {
  return a + b;
}

function minus(a, b) {
  return a - b;
}

function multiply(a, b) {
  return a * b;
}

and I need to parse it and get each function individually. Something
like that:

getFunctionNames() : return an ArrayList containing the function
names;

getFunctionBody(String functionName): returns the body of the function
(i.e. the implementation).

Is it possible to do with Rhino? Or I need to use something like
javaCC to create a parser to js?

Thanks in advance

Carlos Augusto Grahl
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to