rustc: Parse the safe address-of operator

This commit is contained in:
Patrick Walton 2012-03-08 12:12:04 -08:00
parent ec8380f9b1
commit 6f8fe78120

View File

@ -1127,6 +1127,12 @@ fn parse_prefix_expr(p: parser) -> pexpr {
hi = e.span.hi;
ex = ast::expr_unary(ast::deref, e);
}
token::AND {
p.bump();
let e = to_expr(parse_prefix_expr(p));
hi = e.span.hi;
ex = ast::expr_unary(ast::addr_of, e);
}
_ { ret parse_dot_or_call_expr(p); }
}
}