From 8f911bb2959153ec4dde184c9d2b85828cfc7c76 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Thu, 7 Jan 2021 06:44:14 +0100 Subject: [PATCH] Changes demonstrating the segfault for #319 --- syntax/grammar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syntax/grammar.js b/syntax/grammar.js index 0047932..0df66ee 100644 --- a/syntax/grammar.js +++ b/syntax/grammar.js @@ -159,7 +159,7 @@ let PatternElement = defer(() => block_placeable)); let inline_text = defer(() => - repeat1(text_char) + repeat(text_char) .map(join) .chain(into(FTL.TextElement))); @@ -174,12 +174,12 @@ let block_text = defer(() => let inline_placeable = defer(() => sequence( string("{"), - maybe(blank), + not(blank), either( // Order matters! SelectExpression, InlineExpression), - maybe(blank), + not(blank), string("}")) .map(element_at(2)) .chain(into(FTL.Placeable)));