From 0f059615786dcdeb436f7d570a6bb3fa2e621eb6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 17 Jul 2021 13:54:26 -0700 Subject: Simplified backrefs by only doing direct substring matching instead of accounting for replacement strings. --- definitions.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'definitions.c') diff --git a/definitions.c b/definitions.c index 3e5f0e2..18bd612 100644 --- a/definitions.c +++ b/definitions.c @@ -65,17 +65,6 @@ def_t *lookup(def_t *defs, size_t namelen, const char *name) return NULL; } -// -// Push a backreference onto the backreference stack -// -def_t *with_backref(def_t *defs, file_t *f, size_t namelen, const char *name, match_t *m) -{ - // TODO: maybe calculate length? (nontrivial because of replacements) - pat_t *backref = new_pat(f, m->start, m->end, 0, -1, BP_BACKREF); - backref->args.backref = m; - return with_def(defs, namelen, name, backref); -} - // // Free all the given definitions up till (but not including) `stop` // -- cgit v1.2.3