aboutsummaryrefslogtreecommitdiff
path: root/nomsu.peg
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-27 18:35:52 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-27 18:36:15 -0700
commit66fa60100e64a1ec2d54e884c5d6e4a98e88fa56 (patch)
tree8126a5270dfc61a24fa8b97c7d123f7367152a8b /nomsu.peg
parent2e15c0fd5067318601e2f3b70ee6fc16ef58200d (diff)
Trivially added support for `foo(1,2)` as sugar for `foo 1 2`
Diffstat (limited to 'nomsu.peg')
-rw-r--r--nomsu.peg2
1 files changed, 2 insertions, 0 deletions
diff --git a/nomsu.peg b/nomsu.peg
index 90becb7..a21d562 100644
--- a/nomsu.peg
+++ b/nomsu.peg
@@ -19,6 +19,7 @@ noindex_inline_expression:
number / variable / inline_text / inline_list / inline_dict / inline_nomsu
/ ( "("
%ws* (inline_block / inline_action / inline_expression) %ws*
+ (comma %ws* (inline_block / inline_action / inline_expression) %ws*)*
(")"
/ (({} ((!. / &%nl) -> 'Expected to find a ) before the end of the line') %userdata) => error)
/ (({} ([^%nl]* -> 'Error while parsing subexpression') %userdata) => error)
@@ -75,6 +76,7 @@ inline_text_interpolation:
variable / inline_list / inline_dict / inline_text
/ ("("
%ws* (inline_block / inline_action / inline_expression) %ws*
+ (comma %ws* (inline_block / inline_action / inline_expression) %ws*)*
(")"
/ (({} (&%nl -> 'Expected to find a ")" before the end of the line') %userdata) => error)
/ (({} ([^%nl]* -> 'Error while parsing text interpolation') %userdata) => error))