Update oper2s.

This commit is contained in:
cfreksen 2017-10-30 00:58:21 +01:00
parent 4d0d13359b
commit 6f64647852
No known key found for this signature in database
GPG Key ID: EAC13EE101008978

8
ll.py
View File

@ -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: {}'