From d38c26eeb5205ce48744f731b89adce4b810d84f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Thu, 20 Jul 2017 10:14:22 +0200 Subject: [PATCH] added a few toString()s --- src/dk/camelot64/kickc/asm/AsmComment.java | 6 ++++++ src/dk/camelot64/kickc/asm/AsmInstruction.java | 5 +++++ src/dk/camelot64/kickc/asm/AsmLabel.java | 6 ++++++ src/dk/camelot64/kickc/icl/SymbolRef.java | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/src/dk/camelot64/kickc/asm/AsmComment.java b/src/dk/camelot64/kickc/asm/AsmComment.java index d601aee64..bd25bc30c 100644 --- a/src/dk/camelot64/kickc/asm/AsmComment.java +++ b/src/dk/camelot64/kickc/asm/AsmComment.java @@ -37,4 +37,10 @@ public class AsmComment implements AsmLine { return "// "+comment; } + @Override + public String toString() { + return getAsm(); + } + + } diff --git a/src/dk/camelot64/kickc/asm/AsmInstruction.java b/src/dk/camelot64/kickc/asm/AsmInstruction.java index ec0be4db0..6c0aa3b66 100644 --- a/src/dk/camelot64/kickc/asm/AsmInstruction.java +++ b/src/dk/camelot64/kickc/asm/AsmInstruction.java @@ -48,4 +48,9 @@ public class AsmInstruction implements AsmLine { return type.getAsm(parameter); } + @Override + public String toString() { + return getAsm(); + } + } diff --git a/src/dk/camelot64/kickc/asm/AsmLabel.java b/src/dk/camelot64/kickc/asm/AsmLabel.java index f58911911..f1fe05568 100644 --- a/src/dk/camelot64/kickc/asm/AsmLabel.java +++ b/src/dk/camelot64/kickc/asm/AsmLabel.java @@ -37,4 +37,10 @@ public class AsmLabel implements AsmLine { public String getAsm() { return label+":"; } + + @Override + public String toString() { + return getAsm(); + } + } diff --git a/src/dk/camelot64/kickc/icl/SymbolRef.java b/src/dk/camelot64/kickc/icl/SymbolRef.java index fa896f024..516693334 100644 --- a/src/dk/camelot64/kickc/icl/SymbolRef.java +++ b/src/dk/camelot64/kickc/icl/SymbolRef.java @@ -90,4 +90,9 @@ public class SymbolRef implements Value { return fullName.substring(0, lastScopeIdx); } } + + @Override + public String toString() { + return getFullName(); + } }