From c5f1ccc4dccc950b300f2a43e20088332b1d056d Mon Sep 17 00:00:00 2001 From: James Eversole Date: Fri, 20 Dec 2024 13:00:06 -0600 Subject: [PATCH] Drop useless comments --- src/Lexer.hs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Lexer.hs b/src/Lexer.hs index 114c6cb..398dfca 100644 --- a/src/Lexer.hs +++ b/src/Lexer.hs @@ -6,7 +6,6 @@ import Text.Megaparsec.Char import Data.Void import qualified Data.Set as Set --- Lexer type and tokens type Lexer = Parsec Void String data LToken = LKeywordT @@ -21,7 +20,6 @@ data LToken | LNewline deriving (Show, Eq, Ord) --- Lexical rules keywordT :: Lexer LToken keywordT = string "t" *> notFollowedBy alphaNumChar *> pure LKeywordT @@ -65,11 +63,9 @@ closeBracket = char ']' *> pure LCloseBracket lnewline :: Lexer LToken lnewline = char '\n' *> pure LNewline --- Whitespace consumer sc :: Lexer () sc = skipMany (char ' ' <|> char '\t') --- Lexer definition saplingLexer :: Lexer [LToken] saplingLexer = many (sc *> choice [ try identifier @@ -84,7 +80,6 @@ saplingLexer = many (sc *> choice , lnewline ] <* sc) <* eof --- Lexing function with enhanced error handling lexSapling :: String -> [LToken] lexSapling input = case runParser saplingLexer "" input of Left err -> error $ "Lexical error:\n" ++ errorBundlePretty err