rustc: Store the lhs and rhs of receive exprs in left to right order

With the changing of receive semantics the parser has been putting the rhs
expression in the first argument of expr_recv and the lhs in the second, and
all subsequent passes have been referring to them backwords (but still doing
the right thing because they were assuming that lhs was the port and rhs was
the receiver).

This makes all code agree on what lhs and rhs mean for receive expressions.
This commit is contained in:
Brian Anderson 2011-06-18 20:16:30 -07:00
parent 364cd5763c
commit 514813148b
6 changed files with 27 additions and 27 deletions

View file

@ -1201,7 +1201,7 @@ fn parse_assign_expr(&parser p) -> @ast::expr {
p.bump();
auto rhs = parse_expr(p);
ret @spanned(lo, rhs.span.hi,
ast::expr_recv(rhs, lhs, p.get_ann()));
ast::expr_recv(lhs, rhs, p.get_ann()));
}
case (token::DARROW) {
p.bump();