mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Fixed named tuple formatting issue, fixed some spacing issues
This commit is contained in:
parent
92d14df5bd
commit
48f2ec42f5
1 changed files with 13 additions and 9 deletions
|
@ -1673,8 +1673,11 @@ void BfPrinter::Visit(BfLambdaBindExpression* lambdaBindExpr)
|
||||||
{
|
{
|
||||||
Visit(lambdaBindExpr->ToBase());
|
Visit(lambdaBindExpr->ToBase());
|
||||||
|
|
||||||
|
if (lambdaBindExpr->mNewToken != NULL)
|
||||||
|
{
|
||||||
VisitChild(lambdaBindExpr->mNewToken);
|
VisitChild(lambdaBindExpr->mNewToken);
|
||||||
ExpectSpace();
|
ExpectSpace();
|
||||||
|
}
|
||||||
VisitChild(lambdaBindExpr->mOpenParen);
|
VisitChild(lambdaBindExpr->mOpenParen);
|
||||||
for (int i = 0; i < (int)lambdaBindExpr->mParams.size(); i++)
|
for (int i = 0; i < (int)lambdaBindExpr->mParams.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -2181,6 +2184,12 @@ void BfPrinter::Visit(BfTupleExpression* tupleExpr)
|
||||||
VisitChild(tupleExpr->mOpenParen);
|
VisitChild(tupleExpr->mOpenParen);
|
||||||
for (int i = 0; i < (int)tupleExpr->mValues.size(); i++)
|
for (int i = 0; i < (int)tupleExpr->mValues.size(); i++)
|
||||||
{
|
{
|
||||||
|
if (i > 0)
|
||||||
|
{
|
||||||
|
VisitChildNoRef(tupleExpr->mCommas.GetSafe(i - 1));
|
||||||
|
ExpectSpace();
|
||||||
|
}
|
||||||
|
|
||||||
if (i < (int)tupleExpr->mNames.size())
|
if (i < (int)tupleExpr->mNames.size())
|
||||||
{
|
{
|
||||||
auto nameNode = tupleExpr->mNames[i];
|
auto nameNode = tupleExpr->mNames[i];
|
||||||
|
@ -2192,11 +2201,6 @@ void BfPrinter::Visit(BfTupleExpression* tupleExpr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > 0)
|
|
||||||
{
|
|
||||||
VisitChildNoRef(tupleExpr->mCommas.GetSafe(i - 1));
|
|
||||||
ExpectSpace();
|
|
||||||
}
|
|
||||||
VisitChild(tupleExpr->mValues[i]);
|
VisitChild(tupleExpr->mValues[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2238,7 +2242,7 @@ void BfPrinter::Visit(BfUnaryOperatorExpression* unaryOpExpr)
|
||||||
bool postOp = (unaryOpExpr->mOp == BfUnaryOp_PostIncrement) || (unaryOpExpr->mOp == BfUnaryOp_PostDecrement);
|
bool postOp = (unaryOpExpr->mOp == BfUnaryOp_PostIncrement) || (unaryOpExpr->mOp == BfUnaryOp_PostDecrement);
|
||||||
if (!postOp)
|
if (!postOp)
|
||||||
VisitChild(unaryOpExpr->mOpToken);
|
VisitChild(unaryOpExpr->mOpToken);
|
||||||
if ((unaryOpExpr->mOp == BfUnaryOp_Ref) || (unaryOpExpr->mOp == BfUnaryOp_Mut) || (unaryOpExpr->mOp == BfUnaryOp_Out) || (unaryOpExpr->mOp == BfUnaryOp_Params))
|
if ((unaryOpExpr->mOp == BfUnaryOp_Ref) || (unaryOpExpr->mOp == BfUnaryOp_Mut) || (unaryOpExpr->mOp == BfUnaryOp_Out) || (unaryOpExpr->mOp == BfUnaryOp_Params) || (unaryOpExpr->mOp == BfUnaryOp_Cascade))
|
||||||
ExpectSpace();
|
ExpectSpace();
|
||||||
VisitChild(unaryOpExpr->mExpression);
|
VisitChild(unaryOpExpr->mExpression);
|
||||||
if (postOp)
|
if (postOp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue