Discussion Thread: DIP 1037--Add Unary Operator ...--Community Review Round 1
qs.il.paperinik at gmail.com
Tue Nov 3 03:14:47 UTC 2020
On Tuesday, 3 November 2020 at 02:30:58 UTC, Manu wrote:
> Perhaps my implementation implies additional grammar changes
> that I didn't notice.
It does, if it should work on types. In the easiest case, if you
alias X(Args...) = (T!Args)...;
to work like
alias X(Args...) = staticMap!(T, Args);
you cannot do that by merely adding a new PostfixExpression. It
is necessary to add `...` to BasicType2X, i.e.
[ AssignExpression ]
[ AssignExpression .. AssignExpression ]
[ Type ]
but I may have overlooked something and it might not suffice. The
grammar concerning "type expressions" is convoluted and has some
stuff going on in AltDeclarator where I'm not entirely sure it
can be ignored.
More information about the Digitalmars-d