Added JSFunction, defineFunction()
git-svn-id: svn://10.0.0.236/trunk@65596 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -30,6 +30,7 @@ namespace JavaScript {
|
||||
*/
|
||||
class JSObject;
|
||||
class JSArray;
|
||||
class JSFunction;
|
||||
|
||||
/**
|
||||
* All JavaScript data types.
|
||||
@@ -47,12 +48,11 @@ namespace JavaScript {
|
||||
float64 f64;
|
||||
JSObject* object;
|
||||
JSArray* array;
|
||||
ICodeModule *icm;
|
||||
JSFunction *function;
|
||||
|
||||
JSValue() : f64(0.0) {}
|
||||
|
||||
explicit JSValue(float64 f64) : f64(f64) {}
|
||||
explicit JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ namespace JavaScript {
|
||||
JSValue interpret(ICodeModule* iCode, const JSValues& args);
|
||||
|
||||
JSValue& defineGlobalProperty(const String& name, const JSValue& value);
|
||||
|
||||
JSValue& defineFunction(const String& name, ICodeModule* iCode);
|
||||
}
|
||||
|
||||
#endif /* interpreter_h */
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace JavaScript {
|
||||
*/
|
||||
class JSObject;
|
||||
class JSArray;
|
||||
class JSFunction;
|
||||
|
||||
/**
|
||||
* All JavaScript data types.
|
||||
@@ -47,12 +48,11 @@ namespace JavaScript {
|
||||
float64 f64;
|
||||
JSObject* object;
|
||||
JSArray* array;
|
||||
ICodeModule *icm;
|
||||
JSFunction *function;
|
||||
|
||||
JSValue() : f64(0.0) {}
|
||||
|
||||
explicit JSValue(float64 f64) : f64(f64) {}
|
||||
explicit JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ namespace JavaScript {
|
||||
JSValue interpret(ICodeModule* iCode, const JSValues& args);
|
||||
|
||||
JSValue& defineGlobalProperty(const String& name, const JSValue& value);
|
||||
|
||||
JSValue& defineFunction(const String& name, ICodeModule* iCode);
|
||||
}
|
||||
|
||||
#endif /* interpreter_h */
|
||||
|
||||
Reference in New Issue
Block a user