summaryrefslogtreecommitdiff
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
parent2241c9f5d572bec5185eb5e7c2c4d937a479568d (diff)
downloadbuildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.tar.gz
buildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.tar.bz2
buildclient-d3c7f67bce284c8829ac53387dec0f863569fac6.zip
Allow continuing directives across newlines with \
-rw-r--r--src/main/frege/buildclient/config/BuildParser.fr3
-rw-r--r--src/main/resources/testconfig.bcc3
2 files changed, 3 insertions, 3 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 []
diff --git a/src/main/resources/testconfig.bcc b/src/main/resources/testconfig.bcc
index d565639..e218c7e 100644
--- a/src/main/resources/testconfig.bcc
+++ b/src/main/resources/testconfig.bcc
@@ -1,6 +1,7 @@
modid "dankersskyblockmod"
label "Dankers Skyblock Mod"
-description "Dankers Mod
+description \
+"Dankers Mod
Multi Line test"
author "Danker"