From 2ef9c01ffcd160937ddccc91a6f5e9fa24f22fd4 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 18 Mar 2011 11:49:06 -0700 Subject: rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now. --- src/comp/front/parser.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 71f0f2d8..028b8a31 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -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; -- cgit v1.2.3