From 600432a8b68548024860356976879e9ff31d0eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 10 Nov 2021 21:58:26 +0100 Subject: Line comments with hash sign --- src/Parser.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Parser.hs b/src/Parser.hs index d4c5a13..1402926 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -26,11 +26,14 @@ type TestParser = ParsecT Void TestStream (State (Set ProcName)) type TestStream = TL.Text +skipLineComment :: TestParser () +skipLineComment = L.skipLineComment $ TL.pack "#" + scn :: TestParser () -scn = L.space space1 empty empty +scn = L.space space1 skipLineComment empty sc :: TestParser () -sc = L.space (void $ takeWhile1P Nothing f) empty empty +sc = L.space (void $ takeWhile1P Nothing f) skipLineComment empty where f x = x == ' ' || x == '\t' wordChar :: TestParser (Token TestStream) -- cgit v1.2.3