diff options
| author | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 17:02:37 +0100 | 
|---|---|---|
| committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-04-19 17:02:37 +0100 | 
| commit | 3fe10dc8f2d00287b10e9689449764dfb3eba3af (patch) | |
| tree | ac69ac04f44db2bcc4fe3c7a7ea3d69cefeea82a | |
| parent | 8a9d6ef5970eea2a42ff9eb537f2a3f5e56aec2c (diff) | |
| download | stred-go-3fe10dc8f2d00287b10e9689449764dfb3eba3af.tar | |
Adds casting all other types to strings by simply putting them in a string
| -rw-r--r-- | walk/walk.go | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/walk/walk.go b/walk/walk.go index cc17245..72fbe11 100644 --- a/walk/walk.go +++ b/walk/walk.go @@ -529,6 +529,14 @@ func Compound(in <-chan Atom) <-chan CompoundResult {  						break loop  					case StringAtom:  						builder.WriteRune(rune(v)) +					case ValueNull: +						builder.WriteString(v.String()) +					case ValueBool: +						builder.WriteString(v.String()) +					case ValueNumber: +						builder.WriteString(v.String()) +					case TerminalValue: +						builder.WriteString(v.String())  					default:  						out<-CompoundResult{nil, CompoundInvalidStringAtom}  						break outer | 
