1
Fork 0

Allow trailing commas in array patterns and attributes

This commit is contained in:
P1start 2014-11-30 17:39:50 +13:00
parent 8d8f41b75f
commit f5715f7867
5 changed files with 26 additions and 7 deletions

View file

@ -3129,6 +3129,11 @@ impl<'a> Parser<'a> {
first = false;
} else {
self.expect(&token::Comma);
if self.token == token::CloseDelim(token::Bracket)
&& (before_slice || after.len() != 0) {
break
}
}
if before_slice {