mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Initializer expressions
This commit is contained in:
parent
f6e31e4976
commit
229a5aa5c5
17 changed files with 305 additions and 18 deletions
|
@ -1206,6 +1206,25 @@ void BfPrinter::Visit(BfSizedArrayCreateExpression* createExpr)
|
|||
VisitChildWithPrecedingSpace(createExpr->mInitializer);
|
||||
}
|
||||
|
||||
void BfPrinter::Visit(BfInitializerExpression* initExpr)
|
||||
{
|
||||
Visit(initExpr->ToBase());
|
||||
|
||||
VisitChild(initExpr->mTarget);
|
||||
ExpectSpace();
|
||||
VisitChild(initExpr->mOpenBrace);
|
||||
for (int i = 0; i < (int)initExpr->mValues.size(); i++)
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
VisitChild(initExpr->mCommas[i - 1]);
|
||||
ExpectSpace();
|
||||
}
|
||||
VisitChild(initExpr->mValues[i]);
|
||||
}
|
||||
VisitChild(initExpr->mCloseBrace);
|
||||
}
|
||||
|
||||
void BfPrinter::Visit(BfCollectionInitializerExpression* initExpr)
|
||||
{
|
||||
Visit(initExpr->ToBase());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue