Skip to content

Commit

Permalink
Add bulk function renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Oct 28, 2024
1 parent 6b42bca commit 6268d31
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 @@ -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<String, String> names) {
ParseTreeWalker.DEFAULT.walk(new ExpressionRenamer(names), root);
}

public static void renameAndWrapShadow(GLSLParser.Translation_unitContext root, String oldName, String newName) {
Expand Down

0 comments on commit 6268d31

Please sign in to comment.