mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-17 16:38:14 +03:00
Handle function prototypes prefixed with a single macro token.
This commit is contained in:
parent
ebbdf95679
commit
4f86ae7907
@ -32,7 +32,14 @@ parseHeaderFile path src =
|
||||
cSyntax = Parsec.sepBy line (Parsec.char '\n')
|
||||
|
||||
line :: Parsec.Parsec String () [XObj]
|
||||
line = Parsec.try functionPrototype <|> discarded
|
||||
line = Parsec.try prefixedFunctionPrototype <|>
|
||||
Parsec.try functionPrototype <|>
|
||||
discarded
|
||||
|
||||
prefixedFunctionPrototype :: Parsec.Parsec String () [XObj]
|
||||
prefixedFunctionPrototype = do Parsec.many spaceOrTab
|
||||
_ <- Parsec.many1 identifierChar
|
||||
functionPrototype
|
||||
|
||||
functionPrototype :: Parsec.Parsec String () [XObj]
|
||||
functionPrototype = do Parsec.many spaceOrTab
|
||||
|
Loading…
Reference in New Issue
Block a user