Function calling begun.
git-svn-id: svn://10.0.0.236/trunk@34703 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
20
mozilla/js/js2/java/NativeFunction.java
Normal file
20
mozilla/js/js2/java/NativeFunction.java
Normal file
@@ -0,0 +1,20 @@
|
||||
class NativeFunction extends JSObject {
|
||||
|
||||
NativeFunction(ControlNode aBody)
|
||||
{
|
||||
super("Function");
|
||||
body = aBody;
|
||||
}
|
||||
|
||||
JSValue call(Environment theEnv, JSValue rV)
|
||||
{
|
||||
ControlNode c = body;
|
||||
while (c != null) c = c.eval(theEnv);
|
||||
|
||||
return theEnv.resultValue;
|
||||
}
|
||||
|
||||
|
||||
ControlNode body;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user