summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2026-05-19 21:39:27 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2026-05-19 21:39:27 +0200
commit340185c5942e71b1cb4cc3cf5972f602eb34c50d (patch)
tree54007ee24172b21a4856bd41c7f1b72373a88421 /src
parentdfa43d2c3ea587e8d816d750cfa7214c6a2eb1b2 (diff)
Fix test preamble parsing conflict with local statement
Diffstat (limited to 'src')
-rw-r--r--src/Parser.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Parser.hs b/src/Parser.hs
index 5ad1b1a..ed03f3f 100644
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -62,6 +62,7 @@ parseTestDefinition = label "test definition" $ toplevel ToplevelTest $ do
void $ L.indentGuard scn EQ ref
off <- stateOffset <$> getParserState
name <- try $ identifier <* osymbol ":"
+ <* ((eol >> mzero) <|> return ()) -- continue only if not on EOL
case name of
"tag" -> do
Just <$> typedExpr FunctionTerm <* eol <* scn