aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2022-04-30 15:23:02 -0400
committerBruce Hill <bruce@bruce-hill.com>2022-04-30 15:23:02 -0400
commit206e1fa68fb921d0fd8c9d31ec59a9b7d0fc2a5d (patch)
tree916e508c47a30ed69c6e904479e642d12ec4d080 /match.c
parent24ed834317f3fda8f0f55489f54a2df1aca5de17 (diff)
Added tagged definitions: `foo:: blah`
Diffstat (limited to 'match.c')
-rw-r--r--match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/match.c b/match.c
index fcea58b..2252fc3 100644
--- a/match.c
+++ b/match.c
@@ -256,7 +256,7 @@ static pat_t *get_prerequisite(match_ctx_t *ctx, pat_t *pat)
if (p->args.repetitions.min == 0)
return p;
p = p->args.repetitions.repeat_pat; break;
- case BP_CAPTURE:
+ case BP_CAPTURE: case BP_TAGGED:
p = p->args.capture.capture_pat; break;
case BP_CHAIN: {
pat_t *f = p->args.multiple.first;
@@ -538,7 +538,7 @@ static match_t *match(match_ctx_t *ctx, const char *str, pat_t *pat)
match_t *after = match(ctx, str, pat->args.pat);
return after ? new_match(pat, str, str, MATCHES(after)) : NULL;
}
- case BP_CAPTURE: {
+ case BP_CAPTURE: case BP_TAGGED: {
match_t *p = match(ctx, str, pat->args.pat);
return p ? new_match(pat, str, p->end, MATCHES(p)) : NULL;
}