summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-11-10 21:58:26 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-11-10 21:58:26 +0100
commit600432a8b68548024860356976879e9ff31d0eb2 (patch)
tree01c376209d00f5dc8dde9d8b845fc52da7f65399
parent3c3735086c738fcc1b4b41b759df7dc736f2870c (diff)
Line comments with hash sign
-rw-r--r--src/Parser.hs7
1 files 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)