private void associationList(List <AssociationElement> associationList, bool addLineBreaks)
        {
            bool first = true;

            foreach (AssociationElement element in associationList)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    writer.Append(',');
                    if (addLineBreaks)
                    {
                        writer.NewLine();
                    }
                    else
                    {
                        writer.Append(' ');
                    }
                }
                VhdlOutputHelper.handleAnnotationsBefore(element, writer);
                associationElement(element);
                VhdlOutputHelper.handleAnnotationsAfter(element, writer);
            }
            if (addLineBreaks)
            {
                writer.NewLine();
            }
        }
        private void writeInterfaceList <T1>(IList <T1> list, bool isGeneric) where T1 : VhdlObjectProvider
        {
            writer.BeginAlign();

            bool first = true;

            foreach (VhdlObjectProvider objectProvider in list)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    writer.Append(";").NewLine();
                }

                if (objectProvider is VhdlObjectGroup <VhdlObject> )
                {
                    VhdlObjectGroup <VhdlObject> group = (VhdlObjectGroup <VhdlObject>)objectProvider;
                    VhdlOutputHelper.handleAnnotationsBefore(group, writer);
                }

                //TODO: check for equal types etc.
                VhdlObject obj0 = objectProvider.VhdlObjects[0];

                InterfaceDeclarationFormat format = Annotations.getAnnotation <InterfaceDeclarationFormat>(obj0);

                if (format != null && format.UseObjectClass)
                {
                    writer.Append(obj0.ObjectClass.ToString()).Append(' ');
                }

                writer.AppendIdentifiers(objectProvider.VhdlObjects, ", ");
                writer.Align();

                writer.Append(" : ");

                if (format != null)
                {
                    if (format.UseMode || (obj0.Mode != VhdlObject.ModeEnum.IN))
                    {
                        writer.Append(obj0.Mode.ToString()).Append(' ');
                    }
                }
                else
                {
                    if (!isGeneric || obj0.Mode != VhdlObject.ModeEnum.IN)
                    {
                        writer.Append(obj0.Mode.ToString()).Append(' ');
                    }
                }

                VhdlObjectOutputHelper.interfaceSuffix(obj0, writer, output);
            }

            writer.NewLine().EndAlign();
        }
 public override void visit(ConcurrentStatement statement)
 {
     VhdlOutputHelper.handleAnnotationsBefore(statement, writer);
     base.visit(statement);
     VhdlOutputHelper.handleAnnotationsAfter(statement, writer);
 }
 public override void visit(ConfigurationItem item)
 {
     VhdlOutputHelper.handleAnnotationsBefore(item, writer);
     base.visit(item);
     VhdlOutputHelper.handleAnnotationsAfter(item, writer);
 }
Ejemplo n.º 5
0
 public override void visit(DeclarativeItem declaration)
 {
     VhdlOutputHelper.handleAnnotationsBefore(declaration, writer);
     base.visit(declaration);
     VhdlOutputHelper.handleAnnotationsAfter(declaration, writer);
 }
Ejemplo n.º 6
0
 public override void visit(Expression expression)
 {
     VhdlOutputHelper.handleAnnotationsBefore(expression, writer);
     base.visit(expression);
     VhdlOutputHelper.handleAnnotationsAfter(expression, writer);
 }
 public override void visit(LibraryUnit unit)
 {
     VhdlOutputHelper.handleAnnotationsBefore(unit, writer);
     base.visit(unit);
     VhdlOutputHelper.handleAnnotationsAfter(unit, writer);
 }
Ejemplo n.º 8
0
 public override void visit(Type type)
 {
     VhdlOutputHelper.handleAnnotationsBefore(type, writer);
     base.visit(type);
     VhdlOutputHelper.handleAnnotationsAfter(type, writer);
 }