Added virtual symbol SymVariable translated from general real SymIdentifier symbol

This commit is contained in:
2024-05-20 06:05:24 +02:00
parent e5c5920db0
commit 7c8dbb0ac7
7 changed files with 12 additions and 32 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ func evalInsert(ctx ExprContext, self *term) (v any, err error) {
list, _ := rightValue.(*ListType)
newList := append(ListType{leftValue}, *list...)
v = &newList
if self.children[1].symbol() == SymIdentifier {
if self.children[1].symbol() == SymVariable {
ctx.UnsafeSetVar(self.children[1].source(), v)
}
} else {
@@ -57,7 +57,7 @@ func evalAppend(ctx ExprContext, self *term) (v any, err error) {
list, _ := leftValue.(*ListType)
newList := append(*list, rightValue)
v = &newList
if self.children[0].symbol() == SymIdentifier {
if self.children[0].symbol() == SymVariable {
ctx.UnsafeSetVar(self.children[0].source(), v)
}
} else {