Fix parsing of labels whose name starts with an instruction
This commit is contained in:
parent
fa4cd218ab
commit
e546996e82
1 changed files with 3 additions and 3 deletions
|
|
@ -27,9 +27,9 @@ lLabel = lexeme $ try $ labelName <* symbol ":"
|
|||
|
||||
lStatement :: Parser (Statement Address)
|
||||
lStatement =
|
||||
SDirective <$> lDirective <* lNewlines
|
||||
<|> SRawInstruction <$> lRawInstruction <* lNewlines
|
||||
<|> SLabel <$> lLabel <* many lNewline
|
||||
try (SDirective <$> lDirective <* lNewlines)
|
||||
<|> try (SRawInstruction <$> lRawInstruction <* lNewlines)
|
||||
<|> (SLabel <$> lLabel <* many lNewline)
|
||||
|
||||
lStatements :: Parser [WithOffset (Statement Address)]
|
||||
lStatements = many (withOffset lStatement)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue