Skip to content

Commit 7409880

Browse files
bors[bot]weirane
andauthored
Merge #11061
11061: Support "move if to guard" for if else chains r=weirane a=weirane The idea is to first parse the if else chain into a vector of `(Condition, BlockExpr)`s until we reach an iflet branch, an else branch, or the end (the tail). Then add the match arms with guard for the vector, and add the tail with no if guard. Because the whole original match arm is replaced and the generated code doesn't have redundent commas, I removed redundent commas in some test cases. Closes #11033. Co-authored-by: Wang Ruochen <[email protected]>
2 parents b14af5c + 95145d5 commit 7409880

File tree

1 file changed

+317
-54
lines changed

1 file changed

+317
-54
lines changed

0 commit comments

Comments
 (0)