Fixing list index starting at 1
This commit is contained in:
parent
312f4cd125
commit
ca495dfd9e
2
spf.py
2
spf.py
@ -111,7 +111,7 @@ class SPFInterpreter(lark.visitors.Interpreter):
|
|||||||
|
|
||||||
def list_get(self, el):
|
def list_get(self, el):
|
||||||
(left, right) = self.visit_children(el)
|
(left, right) = self.visit_children(el)
|
||||||
return left[right]
|
return left[right-1]
|
||||||
|
|
||||||
|
|
||||||
def expression(self, el):
|
def expression(self, el):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user