diff options
Diffstat (limited to 'src/Language/Fiddle/Parser.hs')
-rw-r--r-- | src/Language/Fiddle/Parser.hs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Language/Fiddle/Parser.hs b/src/Language/Fiddle/Parser.hs index 94fbbf9..c9c3c86 100644 --- a/src/Language/Fiddle/Parser.hs +++ b/src/Language/Fiddle/Parser.hs @@ -60,13 +60,10 @@ fiddleDecl = do t <- tokenType <$> anyToken case t of KWOption -> OptionDecl <$> ident <*> ident - KWPackage -> do - p <- - PackageDecl - <$> ident - <*> defer body packageBody - printNext - return p + KWPackage -> + PackageDecl + <$> ident + <*> defer body packageBody KWLocation -> LocationDecl <$> ident <*> (tok TokEq >> expression) KWBits -> BitsDecl <$> ident <*> (tok TokColon >> bitType) KWObjtype -> @@ -189,7 +186,7 @@ registerBitsTypeRef = do baseTypeRef = withMeta $ (RegisterBitsJustBits <$> exprInParen) - <|> (RegisterBitsAnonymousType <$> anonymousBitsType) + <|> (RegisterBitsAnonymousType <$> anonymousBitsType) <|> (RegisterBitsReference <$> ident) anonymousBitsType :: Pa AnonymousBitsType |