From d5ab8f4939a4af51c7a9e1c2cd73c8352f8345b4 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 25 Jul 2020 20:38:58 +0200 Subject: Allow hanging indent in parser --- parser/CC/Parser.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parser') 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 -- cgit v1.2.3-70-g09d2