From 6268d31853575b578ef32fed4c689220eb18716f Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 26 Oct 2024 11:09:33 -0400 Subject: [PATCH] Add bulk function renaming --- src/main/java/org/taumc/glsl/Util.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/taumc/glsl/Util.java b/src/main/java/org/taumc/glsl/Util.java index cb90f07..0116b58 100644 --- a/src/main/java/org/taumc/glsl/Util.java +++ b/src/main/java/org/taumc/glsl/Util.java @@ -126,7 +126,11 @@ public static void renameArray(GLSLParser.Translation_unitContext root, String o } public static void renameFunctionCall(GLSLParser.Translation_unitContext root, String oldName, String newName) { - ParseTreeWalker.DEFAULT.walk(new ExpressionRenamer(Collections.singletonMap(oldName, newName)), root); + renameFunctionCall(root, Collections.singletonMap(oldName, newName)); + } + + public static void renameFunctionCall(GLSLParser.Translation_unitContext root, Map names) { + ParseTreeWalker.DEFAULT.walk(new ExpressionRenamer(names), root); } public static void renameAndWrapShadow(GLSLParser.Translation_unitContext root, String oldName, String newName) {