private void associationElement(AssociationElement element)
 {
     if (element.Formal != null)
     {
         writer.Append(element.Formal);
         writer.Align();
         writer.Append(" => ");
     }
     if (element.Actual == null)
     {
         writer.Append(KeywordEnum.OPEN.ToString());
     }
     else
     {
         output.writeExpression(element.Actual);
     }
 }
Example #2
0
 protected override void visitRecordType(RecordType type)
 {
     //TODO: implement repeated label
     appendTypePrefix(type);
     writer.Indent().NewLine();
     writer.Append(KeywordEnum.RECORD.ToString()).Indent().NewLine().BeginAlign();
     foreach (RecordType.ElementDeclaration element in type.Elements)
     {
         writer.AppendStrings(element.Identifiers, ", ");
         writer.Align().Append(" : ");
         output.writeSubtypeIndication(element.Type);
         writer.Append(';').NewLine();
     }
     writer.EndAlign().Dedent();
     writer.Append(KeywordEnum.END.ToString()).Append(KeywordEnum.RECORD.ToString());
     writer.Dedent();
     writer.Append(';').NewLine();
 }