From 6c0b4a4288242d72820805e4acd3c122f5d1fe2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Wed, 24 Sep 2025 21:21:59 +0800 Subject: [PATCH] doc(lexer): explain the use of incSourceColumn I think it is clearer to phrase it this way so it is clear that we are not unconsuming (i.e. changing the state of the parser). --- src/Lexer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Lexer.hs b/src/Lexer.hs index 3e98cce..273a0fe 100644 --- a/src/Lexer.hs +++ b/src/Lexer.hs @@ -221,7 +221,7 @@ link :: Lexer link = do pos <- getPosition l <- linkRaw - -- "unconsume" the last token + -- register the position of the last token pos' <- flip incSourceColumn (-1) <$> getPosition pure $ (pos, LinkOpen) : l <> [(pos', LinkClose)]