diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-03-15 15:26:35 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-03-15 15:26:35 -0400 |
commit | d581c7503f20a8b560a98e521daec632c763c56c (patch) | |
tree | f6e2e5f8d0f40734fb3a124aee4734a0c99e4bd1 /src/texec/eval.go | |
parent | a2f399fdd922495dcac60f4f4601a9729b10e114 (diff) |
[HOTFIX] Fix tokens not generating at eof
Diffstat (limited to 'src/texec/eval.go')
-rw-r--r-- | src/texec/eval.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/texec/eval.go b/src/texec/eval.go index ead8f74..3eca821 100644 --- a/src/texec/eval.go +++ b/src/texec/eval.go @@ -448,14 +448,16 @@ func cata(str TType, skp int, dat []interface{}) { } func convertValPS(from, to TType, sk int, dat interface{}) interface{} { - if isStruct(to, sk) { - if equateTypePS(from, tStruct, sk) { - return cvsa(to, sk, ) + if equateTypePS(from, tStruct, sk) { + if isStruct(to, sk) { + return cvsa(to, sk) + } else if isArray(to, sk) { + } - } else if isArray(to, sk) { - if equateTypePS(from, tStruct, sk) || isArray(from, sk) { + } else if isArray(from, sk) { + if isArray(to, sk) { out := []interface{} - for i := 0; i < len(dat.([]interface{});i++ { + for i := 0; i < len(dat.([]interface{}));i++ { out = append(out, convertValPS(from, to, sk + 1, dat.([]interface{})[i])) } } @@ -463,7 +465,7 @@ func convertValPS(from, to TType, sk int, dat interface{}) interface{} { if equateTypePS(to, tInt, sk) { return dat.(int) } else if equateTypePS(to, tCharp, sk) { - return dat.() + return dat.(byte) } } |