From 55459d338d3d6159fc6e5e3f55c5c945442539c6 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 13 Apr 2024 15:23:14 -0600 Subject: [PATCH] update hscript compatibility --- hank/HInterface.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hank/HInterface.hx b/hank/HInterface.hx index f3acb5b..c1afa69 100644 --- a/hank/HInterface.hx +++ b/hank/HInterface.hx @@ -106,9 +106,10 @@ class HInterface { public function new(storyTree:StoryNode, viewCounts:Map) { this.parser = new Parser(); - parser.unops["*"] = false; - parser.unops["&"] = false; - parser.unops["->"] = false; + // Make new unops: + for (op in ["*", "&", "->"]) { + parser.opPriority.set(op, -2); + } this.interp = new HankInterp(this); this.interp.variables['_isTruthy'] = isTruthy.bind(viewCounts);