diff --git a/src/main/java/org/taumc/glsl/Util.java b/src/main/java/org/taumc/glsl/Util.java index ff27963..cb90f07 100644 --- a/src/main/java/org/taumc/glsl/Util.java +++ b/src/main/java/org/taumc/glsl/Util.java @@ -63,7 +63,11 @@ public static void injectFunction(GLSLParser.Translation_unitContext root, Strin } public static void rename(GLSLParser.Translation_unitContext root, String oldName, String newName) { - ParseTreeWalker.DEFAULT.walk(new Renamer(Collections.singletonMap(oldName, newName)), root); + rename(root, Collections.singletonMap(oldName, newName)); + } + + public static void rename(GLSLParser.Translation_unitContext root, Map names) { + ParseTreeWalker.DEFAULT.walk(new Renamer(names), root); } public static void replaceExpression(GLSLParser.Translation_unitContext root, String oldCode, String newCode) {