aboutsummaryrefslogtreecommitdiff
path: root/grammar.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-12 19:27:57 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-12 19:27:57 -0800
commit8144ae5dc941cce599889c0feb15ecceb9e4f878 (patch)
tree64991885ab9f0d65c3f5964276aeac1020d10198 /grammar.c
parent659ed934d297d0d21d141bc4e9ecf8519a390eb1 (diff)
Renamed op.op -> op.type
Diffstat (limited to 'grammar.c')
-rw-r--r--grammar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/grammar.c b/grammar.c
index 323aef8..431e054 100644
--- a/grammar.c
+++ b/grammar.c
@@ -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);