From d3f13c148de84e66b175170f69502dadc01141ab Mon Sep 17 00:00:00 2001 From: Jan Mas Rovira Date: Wed, 4 Dec 2024 14:20:02 +0100 Subject: [PATCH] properly register comments as parsed items --- .../Translation/FromSource/ParserResultBuilder.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Juvix/Compiler/Concrete/Translation/FromSource/ParserResultBuilder.hs b/src/Juvix/Compiler/Concrete/Translation/FromSource/ParserResultBuilder.hs index f4b4c4234f..96cac9db12 100644 --- a/src/Juvix/Compiler/Concrete/Translation/FromSource/ParserResultBuilder.hs +++ b/src/Juvix/Compiler/Concrete/Translation/FromSource/ParserResultBuilder.hs @@ -95,12 +95,14 @@ runParserResultBuilder s = registerItem' i RegisterSpaceSpan g -> do modify' (over parserStateComments (g :)) - forM_ (g ^.. spaceSpan . each . _SpaceComment) $ \c -> - registerItem' - ParsedItem - { _parsedLoc = getLoc c, - _parsedTag = ParsedTagComment - } + forM_ (g ^.. spaceSpan . each . _SpaceComment) $ \c -> do + let i = + ParsedItem + { _parsedLoc = getLoc c, + _parsedTag = ParsedTagComment + } + highlightParsedItem i + registerItem' i ignoreParserResultBuilder :: Sem (ParserResultBuilder ': r) a -> Sem r a ignoreParserResultBuilder = interpret $ \case