diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-12-04 14:44:00 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-12-04 14:44:00 +0000 |
commit | 94fecea73b0185ff37eb47502f07a8f1e69cd3f9 (patch) | |
tree | 1395e029c06fcb4071fe7bcef5a035504aa716a8 | |
parent | 61a73ce50b1c779879bffcd8235e9a529f3b1949 (diff) | |
download | pp2cc-94fecea73b0185ff37eb47502f07a8f1e69cd3f9.tar.gz |
Slightly better formatting of parsed asm
-rw-r--r-- | AsmLine.py | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -106,13 +106,10 @@ class AsmLine(object): return self.id_dict[name] def __str__(self): """Returns a line of assembly""" - line = "" - if self.label: - line += str(self.label) + ": " - line += self.instruction + line = self.instruction.ljust(4) if self.register: line += " " + self.register if self.operand: # join all operand parts together line += " " + "".join(str(elm) for elm in self.operand) - return line + return self.asm.format_line(line, self.label) |