diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:05:58 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 15:07:10 -0800 |
| commit | b6d3cbd61cd08e39d20a569b7c5ece6bb25897dd (patch) | |
| tree | ccf3930b7a2834ffad1a10a9d91f0042542dec34 /nomsu.6.peg | |
| parent | 0760d4fb6495c4aa4f74038457acede5063f514a (diff) | |
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.
Diffstat (limited to 'nomsu.6.peg')
| -rw-r--r-- | nomsu.6.peg | 6 |
1 files changed, 5 insertions, 1 deletions
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 |
