Example #1
0
 private void WriteVariant(TextWriter writer, Variant variant)
 {
     PascalSyntax.WriteList(writer, ",", variant.TagValues);
     writer.Write(" : (");
     PascalSyntax.WriteList(writer, ";", variant.Fields, Record.WriteField);
     writer.Write(")");
 }
Example #2
0
 public void Write(TextWriter writer)
 {
     writer.Write("case ");
     if (VariantTag != null)
     {
         writer.Write(VariantTag);
         writer.Write(" :");
     }
     TagType.Write(writer);
     writer.Write(" of ");
     PascalSyntax.WriteList(writer, "; ", Variants, WriteVariant);
 }
Example #3
0
 public static void Write(TextWriter writer, ParameterDeclaration decl)
 {
     if (decl.ByReference)
     {
         writer.Write("var");
         writer.Write(" ");
     }
     PascalSyntax.WriteList(writer, ", ", decl.ParameterNames, (w, s) => w.Write(s));
     writer.Write(" : ");
     if (decl.Type == null)
     {
         writer.Write("(NULL)");
     }
     else
     {
         decl.Type.Write(writer);
     }
 }