Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public void GenerateCodeFromExpression(CodeExpression csExp, TextWriter writer, CodeGeneratorOptions codeGeneratorOptions)
 {
     this.writer = new IndentingTextWriter(writer);
     csExp.Accept(new CSharpExpressionWriter(this.writer));
 }