public void indexSubtypeIndication(IndexSubtypeIndication indication) { if (indication.BaseType != null) { output.writeSubtypeIndication(indication.BaseType); } else { writer.Append("null"); } writer.Append('('); bool first = true; foreach (DiscreteRange range in indication.Ranges) { if (first) { first = false; } else { writer.Append(", "); } output.writeDiscreteRange(range); } writer.Append(')'); }
protected override void visitForGenerateStatement(ForGenerateStatement statement) { appendLabel(statement); writer.Append(KeywordEnum.FOR.ToString()).Append(' '); writer.Append(statement.Parameter.Identifier); writer.Append(' ').Append(KeywordEnum.IN.ToString()).Append(' '); output.writeDiscreteRange(statement.Range); appendGenerateStatementSuffix(statement); }
protected override void visitConstrainedArray(ConstrainedArray type) { appendTypePrefix(type); writer.Append(' ').Append(KeywordEnum.ARRAY.ToString()).Append(" ("); bool first = true; foreach (DiscreteRange range in type.IndexRanges) { if (first) { first = false; } else { writer.Append(", "); } output.writeDiscreteRange(range); } writer.Append(") ").Append(KeywordEnum.OF.ToString()).Append(' '); output.writeSubtypeIndication(type.ElementType); writer.Append(';').NewLine(); }
public void visit(Slice name) { output.writeExpression(name.Prefix); writer.Append('('); for (int i = 0; i < name.Ranges.Count; i++) { DiscreteRange r = name.Ranges[i]; output.writeDiscreteRange(r); if (i < name.Ranges.Count - 1) { writer.Append(", "); } } writer.Append(')'); }