diff options
| author | 2024-09-12 17:03:03 -0500 | |
|---|---|---|
| committer | 2024-09-12 17:23:34 -0500 | |
| commit | 9694aee819af65f0089e351c450343d5d11b41ad (patch) | |
| tree | c2fd5ea77dcdc62338465bbfcb305e8c181ed562 /src/include | |
| parent | More CI testing. (diff) | |
Add rules for nth and only-tags. Address #1503
These rules allow selecting from a number of sub-captures
while dropping the rest. `nth` is more succinct in many cases, but `only-tags` is
more general and corresponds to an internal mechanism already present.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/janet.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/janet.h b/src/include/janet.h index ce37b84a..eb0b462f 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -2180,7 +2180,9 @@ typedef enum { RULE_UNREF, /* [rule, tag] */ RULE_CAPTURE_NUM, /* [rule, tag] */ RULE_SUB, /* [rule, rule] */ - RULE_SPLIT /* [rule, rule] */ + RULE_SPLIT, /* [rule, rule] */ + RULE_NTH, /* [nth, rule, tag] */ + RULE_ONLY_TAGS, /* [rule] */ } JanetPegOpcod; typedef struct { |
