summaryrefslogtreecommitdiff
path: root/mi/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/match.c')
-rw-r--r--mi/match.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/mi/match.c b/mi/match.c
index ba69d90..f3e3689 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -955,11 +955,19 @@ gendtree(Node *m, Node *val, Node **lbl, size_t nlbl)
fatal(pat[cur->i], "wildcard variables have different types in the or-patterns");
}
}
- /* If the match arm does not have or-pattern, we can insert the assignements of the captures at the beginning of the associated block.
- * Otherwise, the captures can bind different locations with the same identifier in thehe or-patterns, and thus the assignments must be
- * carried out before jumping into the block.
- * For this reason, in the case of having or-pattern, we store the information of captures in the dtree MATCH node and delegate the
- * insertion of the captures assignments to the ir generation of dtree */
+ /*
+ * If the match arm does not have or-pattern, we can
+ * insert the assignements of the captures at the
+ * beginning of the associated block. Otherwise,
+ * the captures can bind different locations with
+ * the same identifier in thehe or-patterns, and
+ * thus the assignments must be carried out before
+ * jumping into the block. For this reason, in the
+ * case of having or-pattern, we store the
+ * information of captures in the dtree MATCH node
+ * and delegate the insertion of the captures
+ * assignments to the ir generation of dtree
+ */
if (cur->hasorpat) {
cur->final->cap = cur->cap;
cur->final->ncap = cur->ncap;