From 0c84c51fe5a0a26811b646822030c761e315c702 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 3 Apr 2022 18:15:02 -0400 Subject: Flush out a few functions for creating structs --- src/texec/eval.go | 118 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 88 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/texec/eval.go b/src/texec/eval.go index 74042a0..86d519f 100644 --- a/src/texec/eval.go +++ b/src/texec/eval.go @@ -426,49 +426,93 @@ func getLiteralType(v tparse.Node) TType { // USE ONLY IN THE CASE OF tStruct! func cvsa(sct TType, dat []interface{}) VarMap { sv := searchDef(sct.T) - + + old_c := cart + cart = sct.T + vars := sv.Data.([]TVariable) - if len(vars) != len(cmp) { + if len(vars) != len(dat) { return nil } out := make(VarMap) for i:=0;i