Allow spaces between = and ; in ASM instructions

During the firstpass, strip spaces from:
 - between the instruction destination and '='
 - between '=' and the instruction ALU ops
 - between the instruction ALU ops and ';'
 - between ';' and the instruction jump

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
Collin J. Doering 2016-01-06 18:06:35 -05:00
parent e85ff2b949
commit da2586db57
1 changed files with 4 additions and 0 deletions

View File

@ -233,11 +233,15 @@ instrLine = do
cInstr' = do
dest <- optionMaybe $ try $ do
(d, _) <- cInstrDest
optional spaces
char '='
optional spaces
return d
(op, _) <- cInstrAluOps
jump <- optionMaybe $ try $ do
optional spaces
char ';'
optional spaces
(j, _) <- cInstrJump
return j