Bring swap through typechecking and typestate.

This commit is contained in:
Michael Sullivan 2011-06-13 17:34:54 -07:00 committed by Graydon Hoare
parent 066599104a
commit cfd1f74ebb
7 changed files with 34 additions and 0 deletions

View file

@ -704,6 +704,12 @@ fn print_expr(&ps s, &@ast::expr expr) {
word_space(s, "=");
print_expr(s, rhs);
}
case (ast::expr_swap(?lhs, ?rhs, _)) {
print_expr(s, lhs);
space(s.s);
word_space(s, "<->");
print_expr(s, rhs);
}
case (ast::expr_assign_op(?op, ?lhs, ?rhs, _)) {
print_expr(s, lhs);
space(s.s);