diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2020-02-23 19:53:25 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2020-02-23 19:53:25 -0300 |
commit | 621203d3239adf80fea769eda93f727cc6f4ac5a (patch) | |
tree | cfadb3cd191d1af529af6775b8b2f3491b7a1f59 /abdl | |
parent | e122005c39752197c722708a363236b20d38c666 (diff) |
Fix infinite matches on empty patterns
Diffstat (limited to 'abdl')
-rw-r--r-- | abdl/_vm.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/abdl/_vm.py b/abdl/_vm.py index 1de2e15..f8b8c80 100644 --- a/abdl/_vm.py +++ b/abdl/_vm.py @@ -289,7 +289,8 @@ def match_helper(ops, defs, tree): res[h.name] = (h.key, h.value) yield res assert len(path) == 1 or isinstance(frame.current_op, End) - frame.prev() + if not frame.prev(): + return in_key = True else: if in_key: |