aboutsummaryrefslogtreecommitdiff
path: root/nomsu.3.peg
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-12-14 17:49:36 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-12-14 17:49:46 -0800
commit6ba84a0f507270fba8e7a68901dc256c2979d7f9 (patch)
tree8f342ace5a015cf14df12bb17525f02de89bf47d /nomsu.3.peg
parent0d88091f8d6cba8c552e2d3ffd3551819f8a4aed (diff)
Initial setup work for syntax version 5.
Diffstat (limited to 'nomsu.3.peg')
-rw-r--r--nomsu.3.peg13
1 files changed, 9 insertions, 4 deletions
diff --git a/nomsu.3.peg b/nomsu.3.peg
index 21fa86c..d43b404 100644
--- a/nomsu.3.peg
+++ b/nomsu.3.peg
@@ -101,17 +101,22 @@ indented_nomsu (EscapedNomsu):
index_chain (IndexChain):
noindex_inline_expression ("." (text_word / noindex_inline_expression))+
+inline_action: inline_methodcall / _inline_action
+inline_methodcall:
+ inline_arg ws* "::" ws* _inline_action
-- Actions need either at least 1 word, or at least 2 tokens
-inline_action (Action):
+_inline_action (Action):
!section_division
- ({:target: inline_arg :} ws* "::" ws*)?
( (inline_arg (ws* (inline_arg / word))+)
/ (word (ws* (inline_arg / word))*))
(ws* inline_block)?
inline_arg: inline_expression / inline_block
-action (Action):
+
+action: methodcall / _action
+methodcall:
+ arg (nl_nodent "..")? ws* "::" (nl_nodent "..")? ws* _action
+_action (Action):
!section_division
- ({:target: arg :} (nl_nodent "..")? ws* "::" (nl_nodent "..")? ws*)?
( (arg ((nl_nodent "..")? ws* (arg / word))+)
/ (word ((nl_nodent "..")? ws* (arg / word))*))
arg: expression / inline_block / indented_block