Skip to content

Commit

Permalink
fix: add lost super classes
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 19, 2023
1 parent aa49873 commit ebcd6d4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import chapi.domain.core.CodePosition
fun CodeDataStruct.toUml(): String {
val output = StringBuilder()

output.append("class $NodeName {\n")
val superClass = Implements + Extend
val superClasses = if (superClass.isNotEmpty()) {
":" + superClass.joinToString(", ") + " "
} else {
""
}

output.append("class $NodeName $superClasses{\n")
Fields.forEach {
output.append(" ${it.TypeKey}: ${it.TypeType}\n")
}
Expand Down

0 comments on commit ebcd6d4

Please sign in to comment.