Mercurial > lbo > hg > pcombinators
changeset 57:66da7e4ab989 draft
Remove unnecessary hold instrumentation in FirstAlternative
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Fri, 24 May 2019 00:53:46 +0200 |
parents | 571cbdc11361 |
children | 24c542f42f75 |
files | pcombinators/combinators.py |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/pcombinators/combinators.py Fri May 24 00:53:06 2019 +0200 +++ b/pcombinators/combinators.py Fri May 24 00:53:46 2019 +0200 @@ -188,16 +188,10 @@ """Attempt parsers until one matches. Result is result of that parser.""" def parse(self, st): - hold = st.hold() for p in self._parsers: - before = st.hold() r, st2 = p.parse(st) if r is not None: - st.release(before) - st.release(hold) return r, st2 - st.reset(before) - st.reset(hold) return None, st class LongestAlternative(_Alternative):