as: fix empty param list

nop was failing
This commit is contained in:
Paul Mathieu 2022-05-07 11:34:35 -07:00
parent 1a88bebf82
commit f27edd36d7

View File

@ -37,6 +37,8 @@ class AsTransformer(lark.Transformer):
def statement(self, s): def statement(self, s):
opcode, *params = s opcode, *params = s
if params[0] is None:
params = []
addr = self.addr addr = self.addr
self.addr += 2 self.addr += 2
return ('OP', addr, opcode, *params) return ('OP', addr, opcode, *params)