Argument.ToString can now recover on nil interface value
This commit is contained in:
parent
eb3fb65c9b
commit
bd456b72e9
@ -131,6 +131,11 @@ func (phrase *Phrase) ToString (indent int, breakLine bool) (output string) {
|
|||||||
|
|
||||||
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
|
func (argument *Argument) ToString (indent int, breakLine bool) (output string) {
|
||||||
if !breakLine { indent = 0 }
|
if !breakLine { indent = 0 }
|
||||||
|
if argument.value == nil {
|
||||||
|
output += "NIL ARGUMENT"
|
||||||
|
if breakLine { output += "\n" }
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
switch argument.kind {
|
switch argument.kind {
|
||||||
case ArgumentKindPhrase:
|
case ArgumentKindPhrase:
|
||||||
|
Reference in New Issue
Block a user