Skip to content

Commit

Permalink
Merge pull request #101 from jfeliu007/issue-61
Browse files Browse the repository at this point in the history
fixes #61
  • Loading branch information
jfeliu007 authored Jul 1, 2020
2 parents 44e6257 + 30e2f11 commit beb9382
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion parser/class_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,13 @@ func (p *ClassParser) renderStructures(pack string, structures map[string]*Struc
structure := structures[name]
p.renderStructure(structure, pack, name, str, composition, extends, aggregations)
}
for tempName, name := range p.allRenamedStructs[pack] {
var orderedRenamedStructs []string
for tempName := range p.allRenamedStructs[pack] {
orderedRenamedStructs = append(orderedRenamedStructs, tempName)
}
sort.Strings(orderedRenamedStructs)
for _, tempName := range orderedRenamedStructs {
name := p.allRenamedStructs[pack][tempName]
str.WriteLineWithDepth(1, fmt.Sprintf(`class "%s" as %s {`, name, tempName))
str.WriteLineWithDepth(2, aliasComplexNameComment)
str.WriteLineWithDepth(1, "}")
Expand Down

0 comments on commit beb9382

Please sign in to comment.