From bd456b72e915a653993b43aacc5b42acbd0c6488 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 17 Aug 2022 00:13:14 -0400 Subject: [PATCH] Argument.ToString can now recover on nil interface value --- parser/tree-tostring.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parser/tree-tostring.go b/parser/tree-tostring.go index 74e7753..f579550 100644 --- a/parser/tree-tostring.go +++ b/parser/tree-tostring.go @@ -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: