From 8c33b3d2c69b6800ca34155d62c000250980e47e Mon Sep 17 00:00:00 2001 From: Matthew Hall Date: Sat, 18 Feb 2023 16:58:51 +1300 Subject: Introduce stdlib and fix lexing bug --- DSL/Parsing.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DSL/Parsing.hs') diff --git a/DSL/Parsing.hs b/DSL/Parsing.hs index d255c35..ba6a5ee 100644 --- a/DSL/Parsing.hs +++ b/DSL/Parsing.hs @@ -11,7 +11,7 @@ buildDSLLexer p t = do return Token { tStr=str, tTag=t } fromStringL :: String -> TokenTag -> DSLLexer -fromStringL s t = buildDSLLexer (list s) t +fromStringL s t = buildDSLLexer (list s) t <* peek (() <$ satisfy isSpace `alt` eof) fromTableL :: [(String, TokenTag)] -> DSLLexer fromTableL table = firstOf $ map (uncurry fromStringL) table -- cgit v1.2.1