Allow optional comma before with
in FRU. Closes #2463.
This commit is contained in:
parent
abef5f54c9
commit
f394933641
2 changed files with 25 additions and 0 deletions
|
@ -724,6 +724,12 @@ class parser {
|
|||
let mut fields = [self.parse_field(token::COLON)];
|
||||
let mut base = none;
|
||||
while self.token != token::RBRACE {
|
||||
// optional comma before "with"
|
||||
if self.token == token::COMMA
|
||||
&& self.token_is_keyword("with",
|
||||
self.look_ahead(1u)) {
|
||||
self.bump();
|
||||
}
|
||||
if self.eat_keyword("with") {
|
||||
base = some(self.parse_expr()); break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue