public override void RenderStatement(TextWriter textWriter)
 {
     textWriter.Write("if (");
     _condition.Render(textWriter);
     textWriter.Write(") return ");
     CodegenExpressionUtil.RenderConstant(textWriter, _constant);
 }
 public override void RenderStatement(TextWriter textWriter)
 {
     textWriter.Write("if (!(");
     textWriter.Write(_var);
     textWriter.Write(" is ");
     CodeGenerationHelper.AppendClassName(textWriter, _type, null);
     textWriter.Write(")) return ");
     CodegenExpressionUtil.RenderConstant(textWriter, _constant);
 }
 public static void ValueExprToString(
     StringBuilder @out,
     Object constant)
 {
     var constantType = constant?.GetType();
     var constantTypeName = constantType?.CleanName();
     
     @out.Append("constant ");
     CodegenExpressionUtil.RenderConstant(@out, constant);
     @out.Append(" type ").Append(constantTypeName);
 }
Esempio n. 4
0
 public void Render(TextWriter textWriter)
 {
     textWriter.Write("((");
     CodeGenerationHelper.AppendClassName(textWriter, _clazz, null);
     textWriter.Write(")");
     _expression.Render(textWriter);
     textWriter.Write(".Underlying).");
     textWriter.Write(_method);
     textWriter.Write("(");
     CodegenExpressionUtil.RenderConstant(textWriter, _constant);
     textWriter.Write(")");
 }
 public void Render(TextWriter textWriter)
 {
     CodeGenerationHelper.AppendClassName(textWriter, _target, null);
     textWriter.Write(".");
     textWriter.Write(_methodName);
     textWriter.Write("(");
     _expression.Render(textWriter);
     foreach (object constant in _consts)
     {
         textWriter.Write(",");
         CodegenExpressionUtil.RenderConstant(textWriter, constant);
     }
     textWriter.Write(")");
 }
Esempio n. 6
0
 public void Render(TextWriter textWriter)
 {
     CodegenExpressionUtil.RenderConstant(textWriter, _constant);
 }