update hscript compatibility

This commit is contained in:
2024-04-13 15:23:14 -06:00
parent d7ec1900a4
commit 55459d338d

View File

@@ -106,9 +106,10 @@ class HInterface {
public function new(storyTree:StoryNode, viewCounts:Map<StoryNode, Int>) { public function new(storyTree:StoryNode, viewCounts:Map<StoryNode, Int>) {
this.parser = new Parser(); this.parser = new Parser();
parser.unops["*"] = false; // Make new unops:
parser.unops["&"] = false; for (op in ["*", "&", "->"]) {
parser.unops["->"] = false; parser.opPriority.set(op, -2);
}
this.interp = new HankInterp(this); this.interp = new HankInterp(this);
this.interp.variables['_isTruthy'] = isTruthy.bind(viewCounts); this.interp.variables['_isTruthy'] = isTruthy.bind(viewCounts);