如果我创建两个int文字的二进制添加表达式(addExpression),如下所示:
BinaryExpressionSyntax addExpression = SyntaxFactory.BinaryExpression(SyntaxKind.AddExpression,SyntaxFactory.LiteralExpression (SyntaxKind.NumericLiteralExpression,SyntaxFactory.Literal(10)),SyntaxFactory.Literal(100)));
. .然后是二进制乘法表达式,其中left是addExpression,right是int literal
BinaryExpressionSyntax multExpression = SyntaxFactory.BinaryExpression(SyntaxKind.MultiplyExpression,addExpression,SyntaxFactory.LiteralExpression (SyntaxKind.NumericLiteralExpression,SyntaxFactory.Literal(5)));
调用multExpression.ToString()输出10 100 * 5.我希望它输出(10 100)* 5.
这是正确的行为吗?