aboutsummaryrefslogtreecommitdiff
path: root/definitions.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-17 13:54:26 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-17 13:54:26 -0700
commit0f059615786dcdeb436f7d570a6bb3fa2e621eb6 (patch)
tree25d183867e3352bd4cbd6e34da34b096ddb524fa /definitions.c
parent26b683ca743755d1959269cdc15dbd38c4a89aa0 (diff)
Simplified backrefs by only doing direct substring matching instead of
accounting for replacement strings.
Diffstat (limited to 'definitions.c')
-rw-r--r--definitions.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/definitions.c b/definitions.c
index 3e5f0e2..18bd612 100644
--- a/definitions.c
+++ b/definitions.c
@@ -66,17 +66,6 @@ def_t *lookup(def_t *defs, size_t namelen, const char *name)
}
//
-// 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`
//
void free_defs(def_t **defs, def_t *stop)