summaryrefslogtreecommitdiff
path: root/src/Parser.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-02-24 22:27:20 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-02-24 22:27:20 +0100
commitbeda8ded7c96c591fdebbbd2cf197a02f8f87d0c (patch)
tree8eb33391786237bf70347a06170ac306710ba6fd /src/Parser.hs
parentaa161777510728c94e51e9ef1d6df4146d7d952b (diff)
Fix parsing of a module starting with whitespace or comment
Diffstat (limited to 'src/Parser.hs')
-rw-r--r--src/Parser.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 94e9a12..1d1d540 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -119,6 +119,7 @@ parseImport = label "import declaration" $ toplevel (\() -> []) $ do
parseTestModule :: FilePath -> TestParser Module
parseTestModule absPath = do
+ scn
moduleName <- choice
[ label "module declaration" $ do
wsymbol "module"