示例#1
0
 public override void Write(TextWriter writer)
 {
     if (ReturnType != null)
     {
         writer.Write("function");
     }
     else
     {
         writer.Write("procedure");
     }
     writer.Write(" ");
     writer.Write(Name);
     if (Parameters.Count > 0)
     {
         writer.Write("(");
         WriteList(writer, "; ", Parameters, ParameterDeclaration.Write);
         writer.Write(")");
     }
     if (ReturnType != null)
     {
         writer.Write(" : ");
         ReturnType.Write(writer);
     }
     if (Body != null)
     {
         writer.Write("; ");
         Body.Write(writer);
     }
 }
示例#2
0
 public override void Write(TextWriter writer)
 {
     writer.Write("type");
     writer.Write(" ");
     writer.Write(Name);
     writer.Write(" = ");
     Type.Write(writer);
 }
示例#3
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);
 }
示例#4
0
 public override void Write(TextWriter writer)
 {
     pointee.Write(writer);
     writer.Write("^");
 }