Add a comment and asmToken parser
This commit is contained in:
parent
7c02901b64
commit
a540e1711a
1 changed files with 10 additions and 0 deletions
|
|
@ -342,6 +342,16 @@ directive =
|
|||
|
||||
pure $ f outerSpan regSpan metaName jsonValue
|
||||
|
||||
comment :: Parser T.Text
|
||||
comment = char ';' *> takeWhileP (Just "comment") (/= '\n')
|
||||
|
||||
asmToken :: Parser (AsmToken Span)
|
||||
asmToken
|
||||
= (TokenLabel <$> name) <|>
|
||||
(TokenInstruction <$> instruction) <|>
|
||||
(TokenDirective <$> directive) <|>
|
||||
fmap (uncurry TokenComment) (withSpan comment)
|
||||
|
||||
parsePhase1 :: Parser Phase1
|
||||
parsePhase1 = undefined
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue