public ICode Printout() { var code = new CodeDiv(this, this.Body.ToArray()).Indent(); code.Prepend("{").Append("}"); code.Prepend(new CodeSpan("for (").Append(";").Append(PreCondition).Append(";").Append(PostStep, " ;, ").Append(")")); if (PostCondition != null) { code.Append(new CodeSpan("endfor (").Append(PostCondition).Append(")")); } else { code.Append(new CodeSpan("endfor")); } return(code); }
public ICode Printout() { CodeDiv code = new CodeDiv(this, this.Body); if (IsElse) { code.Prepend("else"); } else { code.Prepend(new CodeSpan("(if ").Append(Condition).Append(" then")); } if (this.Next != null) { code.Append(this.Next); } code.Append(")"); return(code); }
public override ICode Printout() { var code = new CodeDiv(this, new CodeSpan(base.Printout()).Append("(").Append(this.Parameters, ",").Append(") -> ") .Append(this.ResultTypeName)); if (this.UserBody != null) { code.Append(this.UserBody); } return(code); }