summaryrefslogtreecommitdiff
path: root/src/texec
diff options
context:
space:
mode:
Diffstat (limited to 'src/texec')
-rw-r--r--src/texec/eval.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/texec/eval.go b/src/texec/eval.go
index 56d2e21..a2c7b8d 100644
--- a/src/texec/eval.go
+++ b/src/texec/eval.go
@@ -714,6 +714,13 @@ func isArray(t TType, skp int) bool {
// Deals with call and index nodes
func evalCIN(v tparse.Node, ctx *VarMap, wk *TVariable) *TVariable {
if v.Sub[0].Data.Data == "call" {
+ if v.Data.Data == "append" && isArray(wk.Type, 0) {
+ tmp := convertVal(evalValue(v.Sub[0].Sub[0], ctx), stripType(wk.Type, 1))
+ i := len((*(wk.Data.(*interface{}))).([]interface{}))
+ *(wk.Data.(*interface{})) = append((*(wk.Data.(*interface{}))).([]interface{}), tmp.Data)
+ return &TVariable{stripType(wk.Type, 1), &((*(wk.Data.(*interface{}))).([]interface{})[i])}
+ }
+
args := []TVariable{}
pth := TArtifact{[]string{}, v.Data.Data}