-
Notifications
You must be signed in to change notification settings - Fork 8
RuleScript
Kriptel edited this page Dec 5, 2024
·
2 revisions
function new(?
interp:RuleScriptInterp, ?parser:Parser)
script = new RuleScript(new RuleScriptInterp(), new HxParser());-
interp- interpreter to be used in the script. The defaultvalueis an instance of the RuleScriptInterp class. -
parser- parser to be used, when calling theexecute/tryExecutefunction with a string as the first argument. Parsers from RuleParsers can also be used as an argument
function execute(
code:StringOrExpr):Dynamic
-
code- сan be a string or hscript.Expr.
var superInstance:Dynamic
source
script.superInstance = obj; // obj with `x(default,set):float` field.script
x = 100; // The x field of obj will be changed to 100,