aboutsummaryrefslogtreecommitdiff
path: root/nomsu.peg
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-04-25 15:37:13 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-04-25 15:37:47 -0700
commitcb28f52b410f3fbcb01bcc8ef8668de46d8aba68 (patch)
treea033da16a67e92d083c2923caea3696422481e3b /nomsu.peg
parentec5d730fa0ac26ace7fdd6a1de5fed9e05c133c0 (diff)
Updated block-style text interpolation to have less redundancy.
Diffstat (limited to 'nomsu.peg')
-rw-r--r--nomsu.peg10
1 files changed, 3 insertions, 7 deletions
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)