private void Write(CodeExpression e, int prec, bool parens) { var oldPrec = precedence; var oldParens = this.parensIfSamePrecedence; precedence = prec; parensIfSamePrecedence = parens; e.Accept(this); precedence = oldPrec; }
public void GenerateCodeFromExpression(CodeExpression csExp, TextWriter writer, CodeGeneratorOptions codeGeneratorOptions) { this.writer = new IndentingTextWriter(writer); csExp.Accept(new CSharpExpressionWriter(this.writer)); }