From 76e2707156290971929331ca4207697576bd6024 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Thu, 20 Mar 2025 13:33:23 +0100 Subject: [PATCH] Fixing append --- spf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spf.py b/spf.py index 8bed937..c8bd74d 100755 --- a/spf.py +++ b/spf.py @@ -29,8 +29,10 @@ class SPFInterpreter(lark.visitors.Interpreter): ligne += str(self.visit_children(toprint)[0]) + " " print(ligne) - # def append(self, el): - # (_, toadd, var) = self.visit_children(el); + def append(self, el): + (_, toadd, var) = self.visit_children(el); + var_val = self.variables.get(var.value) + var_val.append(toadd) def declaration(self, el): type = el.children[0].value