aboutsummaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-07-25 20:38:58 +0200
committerTom Smeding <tom.smeding@gmail.com>2020-07-25 20:38:58 +0200
commitd5ab8f4939a4af51c7a9e1c2cd73c8352f8345b4 (patch)
treeded561d83a26b6ae3c967c556b231b20f44518a7 /parser
parent5b15f056d1a52d6d05f9441d44bf0b50ae480229 (diff)
Allow hanging indent in parser
Diffstat (limited to 'parser')
-rw-r--r--parser/CC/Parser.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser/CC/Parser.hs b/parser/CC/Parser.hs
index 3183dea..bbabe3c 100644
--- a/parser/CC/Parser.hs
+++ b/parser/CC/Parser.hs
@@ -147,7 +147,7 @@ emptyLines :: Parser ()
emptyLines = (try (whitespace >> newline) >> emptyLines) <|> try (whitespace >> eof) <|> return ()
whitespace :: Parser ()
-whitespace = void (many (char ' '))
+whitespace = void (many (void (char ' ') <|> void (try (string "\n "))))
getPosition :: Parser SourcePos
getPosition = do