Fix parsing of hinting instructions that end in a PUSHB
Sounds useless, but MReifutaiM-Regular.ttf seems to have that, and the parsing back from XML was failing because we expected a token whereas after dropping whitespace there wasn't any left.
This commit is contained in:
parent
17700bf926
commit
fc4f438496
@ -300,8 +300,8 @@ class Program:
|
|||||||
push(op)
|
push(op)
|
||||||
else:
|
else:
|
||||||
args = []
|
args = []
|
||||||
|
pos = skipWhite(assembly, pos)
|
||||||
while pos < lenAssembly:
|
while pos < lenAssembly:
|
||||||
pos = skipWhite(assembly, pos)
|
|
||||||
m = _tokenRE.match(assembly, pos)
|
m = _tokenRE.match(assembly, pos)
|
||||||
if m is None:
|
if m is None:
|
||||||
raise tt_instructions_error, "Syntax error in TT program (%s)" % assembly[pos:pos+15]
|
raise tt_instructions_error, "Syntax error in TT program (%s)" % assembly[pos:pos+15]
|
||||||
@ -309,6 +309,7 @@ class Program:
|
|||||||
if number is None and comment is None:
|
if number is None and comment is None:
|
||||||
break
|
break
|
||||||
pos = m.regs[0][1]
|
pos = m.regs[0][1]
|
||||||
|
pos = skipWhite(assembly, pos)
|
||||||
if comment is not None:
|
if comment is not None:
|
||||||
continue
|
continue
|
||||||
args.append(int(number))
|
args.append(int(number))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user