Update struct_expr grammar for field init shorthand.

This commit is contained in:
theduke 2017-01-10 12:35:04 +01:00
parent 78c892d865
commit 487ca5ccc5

View File

@ -510,8 +510,9 @@ unit_expr : "()" ;
### Structure expressions
```antlr
struct_expr : expr_path '{' ident ':' expr
[ ',' ident ':' expr ] *
struct_expr_field_init : ident | ident ':' expr ;
struct_expr : expr_path '{' struct_expr_field_init
[ ',' struct_expr_field_init ] *
[ ".." expr ] '}' |
expr_path '(' expr
[ ',' expr ] * ')' |