Fixing append
This commit is contained in:
parent
5d21e611f0
commit
76e2707156
6
spf.py
6
spf.py
@ -29,8 +29,10 @@ class SPFInterpreter(lark.visitors.Interpreter):
|
|||||||
ligne += str(self.visit_children(toprint)[0]) + " "
|
ligne += str(self.visit_children(toprint)[0]) + " "
|
||||||
print(ligne)
|
print(ligne)
|
||||||
|
|
||||||
# def append(self, el):
|
def append(self, el):
|
||||||
# (_, toadd, var) = self.visit_children(el);
|
(_, toadd, var) = self.visit_children(el);
|
||||||
|
var_val = self.variables.get(var.value)
|
||||||
|
var_val.append(toadd)
|
||||||
|
|
||||||
def declaration(self, el):
|
def declaration(self, el):
|
||||||
type = el.children[0].value
|
type = el.children[0].value
|
||||||
|
Loading…
x
Reference in New Issue
Block a user