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:
parent
e85ff2b949
commit
da2586db57
|
@ -233,11 +233,15 @@ instrLine = do
|
||||||
cInstr' = do
|
cInstr' = do
|
||||||
dest <- optionMaybe $ try $ do
|
dest <- optionMaybe $ try $ do
|
||||||
(d, _) <- cInstrDest
|
(d, _) <- cInstrDest
|
||||||
|
optional spaces
|
||||||
char '='
|
char '='
|
||||||
|
optional spaces
|
||||||
return d
|
return d
|
||||||
(op, _) <- cInstrAluOps
|
(op, _) <- cInstrAluOps
|
||||||
jump <- optionMaybe $ try $ do
|
jump <- optionMaybe $ try $ do
|
||||||
|
optional spaces
|
||||||
char ';'
|
char ';'
|
||||||
|
optional spaces
|
||||||
(j, _) <- cInstrJump
|
(j, _) <- cInstrJump
|
||||||
return j
|
return j
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue