rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.

This commit is contained in:
Patrick Walton
2011-03-18 11:49:06 -07:00
parent 4c2245d842
commit 2ef9c01ffc
6 changed files with 87 additions and 25 deletions

View File

@@ -615,6 +615,10 @@ impure fn parse_path(parser p, greed g) -> ast.path {
impure fn parse_mutability(parser p) -> ast.mutability {
if (p.peek() == token.MUTABLE) {
p.bump();
if (p.peek() == token.QUES) {
p.bump();
ret ast.maybe_mut;
}
ret ast.mut;
}
ret ast.imm;