Hi,
I'm embedding Rhino parser within our application and I've found the
following problem: the parser throws a "invalid return" parse exception when
the return statement is in the top scope (outside any function). For
example, the following javascript program provokes 3 errors.
var b = true;
if(b) {
return
} else if (b<0) {
return 5
} else {
return "bye"
}
If I'm not wrong, previous script is a valid Ecma program and our
application uses this construct so I need to be able to parse it.
Am I doing something wrongly? Do I need to set up some flag on the parser?
Cheers,
Iván
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino