Skip to content

Commit

Permalink
Add bulk renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Oct 26, 2024
1 parent 24f6ae3 commit 7aafcd0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/org/taumc/glsl/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> names) {
ParseTreeWalker.DEFAULT.walk(new Renamer(names), root);
}

public static void replaceExpression(GLSLParser.Translation_unitContext root, String oldCode, String newCode) {
Expand Down

0 comments on commit 7aafcd0

Please sign in to comment.