From 340185c5942e71b1cb4cc3cf5972f602eb34c50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Tue, 19 May 2026 21:39:27 +0200 Subject: Fix test preamble parsing conflict with local statement --- src/Parser.hs | 1 + test/asset/parser/tags.et | 10 ++++++++++ 2 files changed, 11 insertions(+) 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 diff --git a/test/asset/parser/tags.et b/test/asset/parser/tags.et index 178295f..3e06e44 100644 --- a/test/asset/parser/tags.et +++ b/test/asset/parser/tags.et @@ -8,3 +8,13 @@ test First: let x = 1 local: let y = 1 + +test Second: + tag: SomeTag + + local: + let x = 1 + +test Third: + local: + let x = 1 -- cgit v1.2.3