public override void WriteTo(CodeWriter writer) { writer.NewLine(); if (Mask) { writer.Write("// "); } writer.Write("if ("); Condition.WriteToWithCast(writer, ProjectConverter.CppTypeName_Bool); writer.Write(")"); writer.AddComment(Comment); using (writer.NewBlock()) { BlockOnTrue.WriteTo(writer); } writer.NewLine(); if (Mask) { writer.Write("// "); } writer.Write("else"); using (writer.NewBlock()) { BlockOnFalse.WriteTo(writer); } }
internal override void WriteTo(MethodCodeDataWriterArgs a) { using (a.NewBlock(1)) { if (UnexaminedCode != null) { new UnexaminedStatement(UnexaminedCode, Mask).WriteTo(a, 0x6B); } else { new ExpressionStatement(new CallExpression(0, 0, new ParamListExpression() { Condition }), Mask, Comment).WriteTo(a, 0x6B); } BlockOnTrue.WriteTo(a); a.ExpressionData.Write((byte)0x50); BlockOnFalse.WriteTo(a); a.ExpressionData.Write((byte)0x51); } a.ExpressionData.Write((byte)0x72); }