some hscript stuff!!

This commit is contained in:
Yoshman29
2022-11-04 19:55:29 +01:00
parent ccf0c833b2
commit ea8e2ba35d
6 changed files with 33 additions and 12 deletions
+6
View File
@@ -17,6 +17,8 @@ class HScript extends Script {
var parser = new hscript.Parser();
parser.allowJSON = parser.allowMetadata = parser.allowTypes = true;
interp.errorHandler = _errorHandler;
interp.staticVariables = Script.staticVariables;
interp.variables.set("trace", this.trace);
try {
expr = parser.parseString(code, fileName);
@@ -79,4 +81,8 @@ class HScript extends Script {
Logs.logText(Std.string(v))
], TRACE);
}
public override function setPublicMap(map:Map<String, Dynamic>) {
this.interp.publicVariables = map;
}
}