From 6f646478525f4ac0048e09261075c1f5eb5b7b39 Mon Sep 17 00:00:00 2001 From: cfreksen Date: Mon, 30 Oct 2017 00:58:21 +0100 Subject: [PATCH] Update oper2s. --- ll.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ll.py b/ll.py index bf20b96..81a9415 100644 --- a/ll.py +++ b/ll.py @@ -95,12 +95,14 @@ def ty2s(ty): def oper2s(operand): - if isinstance(operand, Const): + if isinstance(operand, Null): + return 'null' + elif isinstance(operand, Const): return str(operand.val) - elif isinstance(operand, Id): - return '%' + operand.val elif isinstance(operand, Gid): return '@' + operand.val + elif isinstance(operand, Id): + return '%' + operand.val else: # TODO print('oper2s: Unknown operand: {}'