Added virtual symbol SymVariable translated from general real SymIdentifier symbol
This commit is contained in:
+2
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user