Generate match {} statements by merging adjacent MatchVariant trie edges.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
(type A (enum
|
||||
(A1 (x B) (y B))))
|
||||
(type B (enum
|
||||
(B1 (x u32))))
|
||||
(B1 (x u32))
|
||||
(B2 (x u32))))
|
||||
|
||||
(decl A2B (A) B)
|
||||
|
||||
@@ -14,6 +15,10 @@
|
||||
(A2B (A.A1 (B.B1 x) _))
|
||||
(B.B1 x))
|
||||
|
||||
(rule 0
|
||||
(A2B (A.A1 (B.B2 x) _))
|
||||
(B.B1 x))
|
||||
|
||||
(rule -1
|
||||
(A2B (A.A1 _ _))
|
||||
(B.B1 42))
|
||||
|
||||
Reference in New Issue
Block a user