Exemple #1
0
 public override void Print(StringBuilder sb, bool verbose, int indentLevel)
 {
     ExpressionHelper.Indent(sb, GetType(), indentLevel);
     sb.Append("[").Append(IsRoot ? "if" : (Condition != null ? "elsif" : "else"));
     if (Parameters != null && Parameters.Count > 0)
     {
         sb.Append(' ');
         ExpressionHelper.PrintDelimited(sb, Parameters, " ", verbose);
     }
     sb.Append("]");
     ExpressionHelper.PrintDelimited(sb, Children, "", verbose, ++indentLevel);
     indentLevel--;
     Fallback?.Print(sb, verbose, indentLevel);
     if (IsRoot)
     {
         ExpressionHelper.Indent(sb, GetType(), indentLevel);
         sb.Append("[endif]");
     }
 }