aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-19 20:32:24 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-19 20:32:24 +0100
commit12a47d1938e53c82bc4fc8df88cf45a956deadbc (patch)
tree622f056d9d9b2950f7273f7d6fd8e85702ea465c /src/main/java
parent327fadfdddba60d836376ac30bccfc0b47d2dc46 (diff)
Rename toTree() to instructionToTree()
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/shedlang/compiler/stackir/InstructionSerializer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/shedlang/compiler/stackir/InstructionSerializer.java b/src/main/java/org/shedlang/compiler/stackir/InstructionSerializer.java
index 1edcdb16..0f6881ae 100644
--- a/src/main/java/org/shedlang/compiler/stackir/InstructionSerializer.java
+++ b/src/main/java/org/shedlang/compiler/stackir/InstructionSerializer.java
@@ -18,19 +18,19 @@ public class InstructionSerializer {
}
public static void serializeInstruction(Instruction instruction, StringBuilder builder) {
- var tree = toTree(instruction);
+ var tree = instructionToTree(instruction);
serializeTree(tree, builder, 0);
}
private static Tree instructionsToTree(List<Instruction> instructions) {
return treeListIndented(
instructions.stream()
- .map(instruction -> toTree(instruction))
+ .map(instruction -> instructionToTree(instruction))
.toList()
);
}
- private static Tree toTree(Instruction instruction) {
+ private static Tree instructionToTree(Instruction instruction) {
return switch (instruction) {
case CallInstruction callInstruction ->
treeList(