From 21e6e5940ecb462436b8dc94428c5cee5cdc9072 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 27 Sep 2024 16:20:32 -0600 Subject: Add import resolution phase and also add a more abstractions around compliation phases. --- src/Language/Fiddle/Parser.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Language/Fiddle/Parser.hs') diff --git a/src/Language/Fiddle/Parser.hs b/src/Language/Fiddle/Parser.hs index b3ed09a..d41cc64 100644 --- a/src/Language/Fiddle/Parser.hs +++ b/src/Language/Fiddle/Parser.hs @@ -59,7 +59,7 @@ directedP subparser = withMeta $ do directiveP :: PaS Directive directiveP = withMeta $ - Directive <$> defer directiveBodyTokens directiveBodyP + Directive <$> defer directiveBodyTokens directiveBodyP directiveBodyP :: PaS DirectiveBody directiveBodyP = withMeta $ do @@ -122,10 +122,10 @@ importListP = withMeta $ do <$> many (ident <* (tok TokComma <|> lookAhead (tok TokRParen))) <* tok TokRParen -importStatementP :: PaS ImportStatement +importStatementP :: Pa ImportStatement importStatementP = withMeta $ - ImportStatement <$> stringTokenP <*> optionMaybe importListP + ImportStatement <$> stringTokenP <*> optionMaybe importListP <*> pure () fiddleDeclP :: Pa FiddleDecl fiddleDeclP = do -- cgit