@@ -7,8 +7,10 @@ module CPP-TRANSLATION-DECL-INITIALIZER-SYNTAX
77 imports CPP-TYPING-SORTS
88
99 // The 'duration' parameter is only passed to `bindReference`
10- syntax Expr ::= figureInit(base: Expr, destT: CPPType, init: Init, type : InitType, duration: Duration)
11- | figureConstructorInit(base: Expr, destT: CPPType, init: Init, constructorType: Bool)
10+ syntax Expr ::= figureConstructorInit(base: Expr, destT: CPPType, init: Init, constructorType: Bool)
11+
12+ syntax Expr ::= FigureInit
13+ syntax FigureInit ::= figureInit(base: Expr, destT: CPPType, init: Init, type : InitType, duration: Duration)
1214
1315 syntax Expr ::= valueInit(base: Expr, CPPType)
1416 | defaultConstructorInit(base: Expr, CPPType, constructorType: Bool)
@@ -55,9 +57,11 @@ module CPP-TRANSLATION-DECL-INITIALIZER
5557 syntax Expr ::= #figureInit0(base: Expr, destT: CPPType, type: InitType, init: Init, ConstructorType, Duration)
5658 | #figureInit(base: Expr, destT: CPPType, type: InitType, init: Init, srcT: K, srcCat: K, ConstructorType, Duration)
5759 | constructorInit(LVal, InitType, Class, List, ConstructorType)
58- | zeroInit(base: Expr, type : CPPType)
5960 | InitStyle "(" Expr "," CPPType "," ConstructorType ")"
6061
62+ syntax Expr ::= ZeroInit
63+ syntax ZeroInit ::= zeroInit(base: Expr, type : CPPType)
64+
6165 syntax InitStyle ::= "defaultInit" | "#valueInit" | "#zeroInit"
6266
6367 rule valueInit(Base::Expr, T::CPPType) => #valueInit(Base, T, NoConstructorInit)
@@ -260,8 +264,8 @@ module CPP-TRANSLATION-DECL-INITIALIZER
260264
261265 syntax KItem ::= listInit(LVal, CPPType, InitType, List, ConstructorType, Duration)
262266 | aggInit(LVal, CPPType, List, ConstructorType, Duration)
263- | arrayInit(base: LVal, type : CPPType, current: Int, initList: List, result: MaybeExpr, ctype: ConstructorType, duration: Duration)
264267 | strInit(LVal, CPPType, CharKind, String, Int, MaybeExpr)
268+ syntax ArrayInit ::= arrayInit(base: LVal, type : CPPType, current: Int, initList: List, result: MaybeExpr, ctype: ConstructorType, duration: Duration)
265269
266270 // @ref n4296 8.5.4 :3.1 (aggregate init)
267271 rule listInit(Base::LVal, T::CPPType, _, L::List, CT::ConstructorType, D::Duration)
0 commit comments