rustc: Change the address-of operator to an explicit production so that we can parse the mutability
This commit is contained in:
parent
0722786664
commit
ddeaea2287
10 changed files with 97 additions and 55 deletions
|
@ -1129,9 +1129,10 @@ fn parse_prefix_expr(p: parser) -> pexpr {
|
|||
}
|
||||
token::AND {
|
||||
p.bump();
|
||||
let m = parse_mutability(p);
|
||||
let e = to_expr(parse_prefix_expr(p));
|
||||
hi = e.span.hi;
|
||||
ex = ast::expr_unary(ast::addr_of, e);
|
||||
ex = ast::expr_addr_of(m, e);
|
||||
}
|
||||
_ { ret parse_dot_or_call_expr(p); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue