1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-12 03:28:07 +00:00

add (til) PEG special

(til sep subpattern) is a specialized (sub) that behaves like
(sub (to sep) subpattern), but advances over the input like (thru sep).
This commit is contained in:
Ian Henry
2024-12-04 21:17:10 -08:00
parent 5d1bd8a932
commit 952906279c
3 changed files with 82 additions and 0 deletions

View File

@@ -2180,6 +2180,7 @@ typedef enum {
RULE_UNREF, /* [rule, tag] */
RULE_CAPTURE_NUM, /* [rule, tag] */
RULE_SUB, /* [rule, rule] */
RULE_TIL, /* [rule, rule] */
RULE_SPLIT, /* [rule, rule] */
RULE_NTH, /* [nth, rule, tag] */
RULE_ONLY_TAGS, /* [rule] */