During semantic analysis, some code gets lowered to the comma expression.
New'ing anonymous classes are a good example of this.
Right now if hdrgen were to emit it, it looks like this (-vcg-ast to get it):
__anonclass1 foo = Object, LeInterface
{
void* this;
}
, foo = new __anonclass1;
Proposed grammar:
CommaExpression:
+ "class" ConstructorArgs|opt AnonBaseClassList|opt AggregateBody
+ "__commaExpr" '(' CommaExpression ')'
This would not break code, nor would it affect tuples. No new AST nodes or semantic behaviour. Just hooking an existing language feature to be fully expressable in syntax.
Ideally, this would be able to bypass the DIP process, due to the bug-fixing nature of it.