Argument.ToString can now recover on nil interface value

This commit is contained in:
Sasha Koshka 2022-08-17 00:13:14 -04:00
parent eb3fb65c9b
commit bd456b72e9
1 changed files with 5 additions and 0 deletions

View File

@ -131,6 +131,11 @@ func (phrase *Phrase) ToString (indent int, breakLine bool) (output string) {
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
if !breakLine { indent = 0 }
if argument.value == nil {
output += "NIL ARGUMENT"
if breakLine { output += "\n" }
return
}
switch argument.kind {
case ArgumentKindPhrase: