aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2021-07-25 23:52:10 -0400
committerGravatar - 2021-07-26 22:55:46 -0400
commit7450cc8663a806677af9210ca5f28ba0d591d249 (patch)
treed3042278566b07682706a9b5c76d7c1556892bc6
parentstart query parser (diff)
queryparse: fix mistaken command in AND
-rw-r--r--queryparse.py2
-rwxr-xr-xtest/t_queryparse.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/queryparse.py b/queryparse.py
index 3fcbbb4..127e09b 100644
--- a/queryparse.py
+++ b/queryparse.py
@@ -95,7 +95,7 @@ def e2(l):
pt = encapsulate(pt, TokType.AND)
while True:
pt2,l = e3(l)
- pt.append(pt2)
+ pt.push(pt2)
except ParseError:
pass
return pt,l
diff --git a/test/t_queryparse.py b/test/t_queryparse.py
index 9bf0511..a37a67b 100755
--- a/test/t_queryparse.py
+++ b/test/t_queryparse.py
@@ -8,3 +8,4 @@ def f(x):
print(queryparse.parse(x))
f(["x", "OR", "y"])
+f(["x", "y", "OR", "a", "b"])