Skip to content

Commit

Permalink
Bison grammar: support parsing default trait impls
Browse files Browse the repository at this point in the history
  • Loading branch information
bleibig committed Mar 1, 2015
1 parent 1576142 commit e93b2ab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/grammar/parser-lalr.y
Expand Up @@ -582,6 +582,14 @@ item_impl
{
$$ = mk_node("ItemImplNeg", 7, $1, $3, $5, $7, $8, $10, $11);
}
| maybe_unsafe IMPL generic_params trait_ref FOR DOTDOT '{' '}'
{
$$ = mk_node("ItemImplDefault", 3, $1, $3, $4);
}
| maybe_unsafe IMPL generic_params '!' trait_ref FOR DOTDOT '{' '}'
{
$$ = mk_node("ItemImplDefaultNeg", 3, $1, $3, $4);
}
;

maybe_impl_items
Expand Down

0 comments on commit e93b2ab

Please sign in to comment.