protected override void visitComponentDeclaration(Component declaration) { writer.Append(KeywordEnum.COMPONENT.ToString()).Append(' '); writer.AppendIdentifier(declaration); OptionalIsFormat format = Annotations.getAnnotation <OptionalIsFormat>(declaration); if (format != null && format.UseIs) { writer.Append(' ').Append(KeywordEnum.IS.ToString()); } writer.Indent().NewLine(); if (declaration.Generic.Count != 0) { output.getMiscellaneousElementOutput().generic(declaration.Generic); } if (declaration.Port.Count != 0) { output.getMiscellaneousElementOutput().port(declaration.Port); } writer.Dedent().Append(KeywordEnum.END.ToString()).Append(KeywordEnum.COMPONENT.ToString()); if (writer.Format.RepeatLabels) { writer.Append(' ').AppendIdentifier(declaration); } writer.Append(";").NewLine(); }
private void appendBlockConfiguration(AbstractBlockConfiguration block, string blockSpecification) { writer.Append(KeywordEnum.FOR.ToString()).Append(' '); writer.Append(blockSpecification); writer.NewLine().Indent(); foreach (UseClause useClause in block.UseClauses) { output.writeLibraryUnit(useClause); } visit(block.ConfigurationItems); writer.Dedent().Append(KeywordEnum.END.ToString()).Append(KeywordEnum.FOR.ToString()).Append(";").NewLine(); }
private void appendGenerateStatementSuffix(AbstractGenerateStatement statement) { writer.Append(' ').Append(KeywordEnum.GENERATE.ToString()).NewLine(); if (statement.Declarations.Count != 0) { writer.Indent(); output.writeDeclarationMarkers(statement.Declarations); writer.Dedent().Append(KeywordEnum.BEGIN.ToString()).NewLine(); } writer.Indent(); visit(statement.Statements); writer.Dedent(); writer.Append(KeywordEnum.END.ToString()).Append(KeywordEnum.GENERATE.ToString()); if (writer.Format.RepeatLabels) { writer.Append(' ').Append(statement.Label); } writer.Append(";").NewLine(); }
protected override void visitArchitecture(Architecture architecture) { writer.Append(KeywordEnum.ARCHITECTURE.ToString()).Append(' '); writer.AppendIdentifier(architecture).Append(' '); writer.Append(KeywordEnum.OF.ToString()).Append(' '); writer.AppendIdentifier(architecture.Entity).Append(' '); writer.Append(KeywordEnum.IS.ToString()).NewLine().Indent(); output.writeDeclarationMarkers(architecture.Declarations); writer.Dedent().Append(KeywordEnum.BEGIN.ToString()).NewLine().Indent(); output.writeConcurrentStatements(architecture.Statements); writer.Dedent().Append(KeywordEnum.END.ToString()).Append(";").NewLine(); }
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(); }
public void generic(IList <VhdlObjectProvider> generic) { writer.Append(KeywordEnum.GENERIC.ToString()).Append(" (").NewLine().Indent(); writeInterfaceList(generic, true); writer.Dedent().Append(");").NewLine(); }
private void appendLoopPart(LoopStatement statement) { writer.Append(KeywordEnum.LOOP.ToString()).NewLine().Indent(); visit(statement.Statements); writer.Dedent().Append(KeywordEnum.END.ToString()).Append(KeywordEnum.LOOP.ToString()).Append(';').NewLine(); }