summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2018-07-09 10:17:24 -0700
committerOri Bernstein <ori@markovcorp.com>2018-07-09 10:17:24 -0700
commit349fb0a3a44d80d9655037eb660af844bc5a3244 (patch)
tree2fc2ff1aa7c14e4358468fd9b935d3892f2f547d
parentf3b87289d7b82879b8dc6336158829ed21881aa0 (diff)
downloadmc-349fb0a3a44d80d9655037eb660af844bc5a3244.tar.gz
Add match tree debug option.
-rw-r--r--mi/match.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mi/match.c b/mi/match.c
index 86db1c5..247f79a 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -724,6 +724,8 @@ gendtree(Node *m, Node *val, Node **lbl, size_t nlbl)
fatal(pat[i], "pattern matched by earlier case");
addcapture(pat[i]->match.block, cap, ncap);
}
+ if (debugopt['M'])
+ dtreedump(stdout, start);
if (!verifymatch(start))
fatal(m, "nonexhaustive pattern set in match statement");
return start;