diff options
author | Max Fischer <maxfischer2781@gmail.com> | 2021-06-26 17:10:52 +0200 |
---|---|---|
committer | Max Fischer <maxfischer2781@gmail.com> | 2021-06-26 17:10:52 +0200 |
commit | 750ced1678e60544d24bb23d83bdf896a9098995 (patch) | |
tree | 1488817fa1434d32b9d883f9f4644ea80c0b25bd | |
parent | ecb4a5e623551d0a37e0e12c89ce016e0a385cfe (diff) | |
download | pyparsing-git-750ced1678e60544d24bb23d83bdf896a9098995.tar.gz |
memo update consistent for all actions
-rw-r--r-- | pyparsing/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py index 5c5c1de..3ad3d1e 100644 --- a/pyparsing/core.py +++ b/pyparsing/core.py @@ -4482,11 +4482,11 @@ class Forward(ParseElementEnhance): return prev_loc, prev_peek.copy() # the match did get better: see if we can improve further else: - prev_loc, prev_peek = memo[self, False] = new_loc, new_peek if doActions: # TODO: store errors - # TODO: fail on backtrack (we go out of sync otherwise) + # TODO: fail on backtrack? (we go out of sync otherwise) memo[self, True] = super().parseImpl(instring, loc, True) + prev_loc, prev_peek = memo[self, False] = new_loc, new_peek |