Fixed DataSection/TypeSection.ToString

This commit is contained in:
Sasha Koshka 2022-09-27 18:43:40 -04:00
parent 6c70e9c50d
commit 3a38465368
1 changed files with 8 additions and 4 deletions

View File

@ -185,8 +185,10 @@ func (section DataSection) ToString (indent int) (output string) {
section.permission.ToString(), " ",
section.name, ":",
section.what.ToString(), "\n")
output += section.argument.ToString(indent + 1, true)
if section.argument.kind != ArgumentKindNil {
output += section.argument.ToString(indent + 1, true)
}
if section.external {
output += doIndent(indent + 1, "external\n")
@ -202,8 +204,10 @@ func (section TypeSection) ToString (indent int) (output string) {
section.permission.ToString(), " ",
section.name, ":",
section.what.ToString(), "\n")
output += section.argument.ToString(indent + 1, true)
if section.argument.kind != ArgumentKindNil {
output += section.argument.ToString(indent + 1, true)
}
return
}