rv2fox: *Properly* understand .byte and .half directives

This commit is contained in:
Ry 2023-02-07 22:26:07 -08:00
parent 55edd58557
commit 435ea9f698

View File

@ -193,12 +193,14 @@ class Converter:
pass # ignore pass # ignore
elif m := re.fullmatch(r'word\s+([^\s]+)', line): elif m := re.fullmatch(r'word\s+([^\s]+)', line):
self.e.data(*m.groups()) self.e.data(*m.groups())
elif m := re.fullmatch(r'half\s+([^\s]+)', line):
self.e.data(*m.groups(), size=16)
elif m := re.fullmatch(r'byte\s+([^\s]+)', line):
self.e.data(*m.groups(), size=8)
elif m := re.fullmatch(r'4byte\s+([^\s]+)', line): elif m := re.fullmatch(r'4byte\s+([^\s]+)', line):
self.e.data(*m.groups()) self.e.data(*m.groups())
elif m := re.fullmatch(r'zero\s+([^\s]+)', line): elif m := re.fullmatch(r'zero\s+([^\s]+)', line):
self.e.zero(*m.groups()) self.e.zero(*m.groups())
elif m := re.fullmatch(r'byte\s+([^\s]+)', line):
self.e.zero(*m.groups())
elif m := re.fullmatch(r'string\s+\"(.*)\"', line): elif m := re.fullmatch(r'string\s+\"(.*)\"', line):
self.e.strz(*m.groups()) self.e.strz(*m.groups())
elif m := re.fullmatch(r'asciz\s+\"(.*)\"', line): elif m := re.fullmatch(r'asciz\s+\"(.*)\"', line):