diff options
author | Mura Li <mura_li@castech.com.tw> | 2020-04-22 09:32:04 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-05-05 20:33:19 -0700 |
commit | 15ad5bac3dd1a18be6e632afa73f5ac12b4a5ec1 (patch) | |
tree | d133a3ccd553cd5e00dc45864c8882cfd29fddab /mi | |
parent | 9ef8abbefa9171d713fba46d8f84ac0000cb758b (diff) | |
download | mc-15ad5bac3dd1a18be6e632afa73f5ac12b4a5ec1.tar.gz |
Support or-patterns with wildcard variables
Diffstat (limited to 'mi')
-rw-r--r-- | mi/match.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -906,7 +906,14 @@ clearemit(Dtree *dt) static int capeq(Node *a, Node *b) { - return 1; + Node *pa, *pb, *va, *vb; + + pa = a->expr.args[0]; + pb = b->expr.args[0]; + va = a->expr.args[1]; + vb = b->expr.args[1]; + + return decltype(decls[pa->expr.did]) == decltype(decls[pb->expr.did]) && loadeq(va, vb); } Dtree * |