From 487ca5ccc52fe27b9352c2b467c91d231ecf9ae7 Mon Sep 17 00:00:00 2001 From: theduke Date: Tue, 10 Jan 2017 12:35:04 +0100 Subject: [PATCH] Update struct_expr grammar for field init shorthand. --- src/doc/grammar.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/doc/grammar.md b/src/doc/grammar.md index 690d44cc2cb..c81f2e2282b 100644 --- a/src/doc/grammar.md +++ b/src/doc/grammar.md @@ -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 ] * ')' |