mirror of
https://github.com/elliotnunn/tbxi-patches.git
synced 2024-05-28 14:41:26 +00:00
Print debug line when label is invalid
This commit is contained in:
parent
809afce45b
commit
147ac8c8d1
|
@ -26,7 +26,7 @@ def assemble(asm):
|
||||||
|
|
||||||
elif line.endswith(':'): # check labels
|
elif line.endswith(':'): # check labels
|
||||||
if not re.match(r'^\w+:$', line):
|
if not re.match(r'^\w+:$', line):
|
||||||
raise SyntaxError('invalid label %r' % line[:-1])
|
raise SyntaxError('invalid label\n %d: %s' % (lineno + 1, clean_asm[lineno].lstrip()))
|
||||||
|
|
||||||
else: # compile instructions!
|
else: # compile instructions!
|
||||||
cur_labels = {lab: lab_offset - offset for (lab, lab_offset) in labels.items()}
|
cur_labels = {lab: lab_offset - offset for (lab, lab_offset) in labels.items()}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user