summaryrefslogtreecommitdiff
path: root/src/main/frege
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-01-24 17:15:53 +0100
committernea <nea@nea.moe>2023-01-24 17:15:53 +0100
commitd3c7f67bce284c8829ac53387dec0f863569fac6 (patch)
treead9fa2e381fdf2b20ee3b82193b63f0ce9b0083d /src/main/frege
parent2241c9f5d572bec5185eb5e7c2c4d937a479568d (diff)
downloadbuildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.tar.gz
buildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.tar.bz2
buildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.zip
Allow continuing directives across newlines with \
Diffstat (limited to 'src/main/frege')
-rw-r--r--src/main/frege/buildclient/config/BuildParser.fr3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/frege/buildclient/config/BuildParser.fr b/src/main/frege/buildclient/config/BuildParser.fr
index f2cc763..23e15ff 100644
--- a/src/main/frege/buildclient/config/BuildParser.fr
+++ b/src/main/frege/buildclient/config/BuildParser.fr
@@ -2,8 +2,6 @@ module buildclient.config.BuildParser where
import Data.MicroParsec as MP
--- <section>
--- </section>
data Token =
BareWord {bval::String}
| Number {nval::String}
@@ -32,6 +30,7 @@ lexer s = lex s 0
private lex :: String -> Int -> [Token]
private lex !cs !start
| endOfSeq = []
+ | ch == '\\' && at 1 == '\n' = lex cs (start + 2)
| ch == '\n' = Token.NewLine : lex cs (start + 1)
| ch.isWhitespace = lex cs (start + 1)
| ch == '"' = string 1 []