mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-25 23:49:17 +00:00
Even more general.
This commit is contained in:
parent
af0e1b41c7
commit
d70092c373
@ -115,11 +115,12 @@ class Parser(object):
|
||||
for node in program.all_children():
|
||||
if isinstance(node, SingleOp):
|
||||
instr = node
|
||||
if isinstance(instr.location, ForwardReference):
|
||||
instr.location = self.lookup(instr.location.name)
|
||||
if isinstance(instr.src, ForwardReference):
|
||||
instr.src = self.lookup(instr.src.name)
|
||||
if instr.opcode in ('call', 'goto'):
|
||||
if isinstance(instr.location, ForwardReference):
|
||||
instr.location = self.lookup(instr.location.name)
|
||||
if isinstance(instr.dest, ForwardReference):
|
||||
instr.dest = self.lookup(instr.dest.name)
|
||||
|
||||
return program
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user