From cb28f52b410f3fbcb01bcc8ef8668de46d8aba68 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 25 Apr 2018 15:37:13 -0700 Subject: Updated block-style text interpolation to have less redundancy. --- nomsu.peg | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'nomsu.peg') diff --git a/nomsu.peg b/nomsu.peg index e4ca686..7e72011 100644 --- a/nomsu.peg +++ b/nomsu.peg @@ -64,13 +64,9 @@ inline_text_interpolation: ) text_interpolation: inline_text_interpolation / - ("\" ( - variable / inline_list / inline_dict / inline_text - / ("(" %ws* (inline_action / inline_expression) %ws* ")") - / (%ws* (block_comment / line_comment)? nodent "..") - / (indented_text %nl+ %nodent "..") - / ((indented_list / indented_block) nodent "..") - )) + ("\" + (block_comment / line_comment / indented_text / indented_list / indented_block)? + nodent "..") number (Number): (("-"? (([0-9]+ "." [0-9]+) / ("." [0-9]+) / ([0-9]+)))-> tonumber) -- cgit v1.2.3