From d3c7f67bce284c8829ac53387dec0f863569fac6 Mon Sep 17 00:00:00 2001 From: nea Date: Tue, 24 Jan 2023 17:15:53 +0100 Subject: Allow continuing directives across newlines with \ --- src/main/frege/buildclient/config/BuildParser.fr | 3 +-- src/main/resources/testconfig.bcc | 3 ++- 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 ---
---
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" -- cgit