diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-12 19:27:57 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-12 19:27:57 -0800 |
| commit | 8144ae5dc941cce599889c0feb15ecceb9e4f878 (patch) | |
| tree | 64991885ab9f0d65c3f5964276aeac1020d10198 /grammar.c | |
| parent | 659ed934d297d0d21d141bc4e9ecf8519a390eb1 (diff) | |
Renamed op.op -> op.type
Diffstat (limited to 'grammar.c')
| -rw-r--r-- | grammar.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -70,7 +70,7 @@ vm_op_t *lookup(def_t *defs, const char *name) static def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m) { vm_op_t *op = new(vm_op_t); - op->op = VM_BACKREF; + op->type = VM_BACKREF; op->start = m->start; op->end = m->end; op->len = -1; // TODO: maybe calculate this? (nontrivial because of replacements) @@ -83,8 +83,8 @@ static def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m) */ def_t *with_backrefs(def_t *defs, file_t *f, match_t *m) { - if (m->op->op != VM_REF) { - if (m->op->op == VM_CAPTURE && m->op->args.capture.name) + if (m->op->type != VM_REF) { + if (m->op->type == VM_CAPTURE && m->op->args.capture.name) defs = with_backref(defs, f, m->op->args.capture.name, m->child); if (m->child) defs = with_backrefs(defs, f, m->child); if (m->nextsibling) defs = with_backrefs(defs, f, m->nextsibling); |
