Sync grammar with spec

- Remove rule LabeledExpr
- Add rule CurlySuffixExpr
This commit is contained in:
hryx 2019-04-23 21:02:10 -07:00 committed by Andrew Kelley
parent 5de934810f
commit 06bf918436

View File

@ -9443,8 +9443,6 @@ PrimaryExpr
IfExpr <- IfPrefix Expr (KEYWORD_else Payload? Expr)?
LabeledExpr <- BlockLabel? (Block / LoopExpr)
Block <- LBRACE Statement* RBRACE
LoopExpr <- KEYWORD_inline? (ForExpr / WhileExpr)
@ -9453,6 +9451,8 @@ ForExpr <- ForPrefix Expr (KEYWORD_else Expr)?
WhileExpr <- WhilePrefix Expr (KEYWORD_else Payload? Expr)?
CurlySuffixExpr <- TypeExpr InitList?
InitList
<- LBRACE FieldInit (COMMA FieldInit)* COMMA? RBRACE
/ LBRACE Expr (COMMA Expr)* COMMA? RBRACE