From 6cfa2181760c0c3b30fafe09d60dbf1d58d01fa7 Mon Sep 17 00:00:00 2001 From: Mistium <92952823+Mistium@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:07:07 +0000 Subject: [PATCH] Update OSL Utils.js --- Resources/OSL Utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Resources/OSL Utils.js b/Resources/OSL Utils.js index 4a348ca7..3edbdb6c 100644 --- a/Resources/OSL Utils.js +++ b/Resources/OSL Utils.js @@ -557,7 +557,7 @@ class OSLUtils { ast.push(this.evalToken(cur)) } - const types = ["opr", "cmp", "qst", "bit", "log"]; + const types = ["opr", "cmp", "qst", "bit", "log", "ury"]; for (let type of types) { for (let i = START ?? 2; i < ast.length; i++) { const cur = ast[i]; @@ -570,6 +570,11 @@ class OSLUtils { ast.splice(i, 2); i -= 1; continue; + } else if (type === "ury") { + cur.right = ast[i + 1]; + ast.splice(i, 1); + i -= 1; + continue; } cur.left = ast[i - 1]; cur.right = ast[i + 1];