Function calling begun.
This commit is contained in:
@@ -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