From b6d3cbd61cd08e39d20a569b7c5ece6bb25897dd Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 1 Jan 2019 15:05:58 -0800 Subject: Misc changes, including text indented interpolations are now indented relative to the text, not the opening '("', code objects can now remove all free vars, the REPL uses global vars. Error API is changing a bit. --- nomsu.6.peg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nomsu.6.peg') diff --git a/nomsu.6.peg b/nomsu.6.peg index 6b4686d..6a1725a 100644 --- a/nomsu.6.peg +++ b/nomsu.6.peg @@ -168,7 +168,11 @@ blank_text_lines <- {~ (%nl ((ws* -> '') (&%nl / !.) / (=curr_indent -> '') &[^%nl]))+ ~} text_interpolation <- - ("\" (indented_block (blank_lines =curr_indent "..")? / indented_expression)) + ({| + -- %indentation will backtrack and match the actual indentation of the current line + "\" {:curr_indent: %indentation :} + (indented_block (blank_lines =curr_indent "..")? / indented_expression) + |} -> unpack) / inline_text_interpolation -- cgit v1.2.3