diff options
| author | 2021-07-25 23:52:10 -0400 | |
|---|---|---|
| committer | 2021-07-26 22:55:46 -0400 | |
| commit | 7450cc8663a806677af9210ca5f28ba0d591d249 (patch) | |
| tree | d3042278566b07682706a9b5c76d7c1556892bc6 | |
| parent | start query parser (diff) | |
queryparse: fix mistaken command in AND
| -rw-r--r-- | queryparse.py | 2 | ||||
| -rwxr-xr-x | test/t_queryparse.py | 1 |
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"]) |
