Improve some error messages.

This commit is contained in:
cfreksen 2017-10-29 18:57:48 +01:00
parent d7598a0039
commit 636b1e5fa1
No known key found for this signature in database
GPG Key ID: EAC13EE101008978

6
ll.py
View File

@ -77,7 +77,7 @@ def ty2s(ty):
return ty2s(ty.inner_ty) + '*' return ty2s(ty.inner_ty) + '*'
else: else:
# TODO # TODO
print('Unknown type: {}' print('ty2s: Unknown type: {}'
.format(ty)) .format(ty))
return str(ty) return str(ty)
@ -89,7 +89,7 @@ def oper2s(operand):
return '%' + operand.val return '%' + operand.val
else: else:
# TODO # TODO
print('Unknown operand: {}' print('oper2s: Unknown operand: {}'
.format(operand)) .format(operand))
@ -104,5 +104,5 @@ def insn2s(insn):
oper2s(insn.left), oper2s(insn.right))) oper2s(insn.left), oper2s(insn.right)))
else: else:
# TODO # TODO
print('Unknown insn: {}' print('insn2s: Unknown insn: {}'
.format(insn)) .format(insn))