Skip to content

Commit 7d4742e

Browse files
committed
Allow macro_rules! m { (...) => ... }
1 parent 7129883 commit 7d4742e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,8 +1131,13 @@ class parser {
11311131
// the interpolation of matchers
11321132
maybe_whole!{self, nt_matchers};
11331133
let name_idx = @mut 0u;
1134-
return self.parse_matcher_subseq(
1135-
name_idx, token::LBRACE, token::RBRACE);
1134+
return alt self.token {
1135+
token::LBRACE | token::LPAREN | token::LBRACKET {
1136+
self.parse_matcher_subseq(name_idx, copy self.token,
1137+
token::flip_delimiter(self.token))
1138+
}
1139+
_ { self.fatal(~"expected open delimiter"); }
1140+
}
11361141
}
11371142
11381143

0 commit comments

Comments
 (0)