start working on opperations

This commit is contained in:
2023-03-07 18:27:06 +00:00
parent 1b3a4c44d9
commit dfb93c60b4
11 changed files with 185 additions and 21 deletions

View File

@@ -68,6 +68,13 @@ func mapGet(r ArMapGet, stack stack) (any, ArErr) {
}
}
func classVal(r any) any {
if _, ok := r.(ArClass); ok {
return r.(ArClass).value
}
return r
}
func isMapGet(code UNPARSEcode) bool {
return mapGetCompile.MatchString(code.code)
}
@@ -81,6 +88,6 @@ func mapGetParse(code UNPARSEcode, index int, codelines []UNPARSEcode) (ArMapGet
if !worked {
return ArMapGet{}, false, err, i
}
k := translateString{key, code.realcode, code.line}
k := key
return ArMapGet{resp, k, code.line, code.realcode, code.path}, true, ArErr{}, 1
}