Skip to content

Commit f9a4272

Browse files
committed
remove unused iterate combinator from binary parser
Dead code: nothing in the parser calls it, and its broad exception swallow (WasmParseError | IndexError | ValueError) risked masking real bugs if it were ever reused.
1 parent afc6f6d commit f9a4272

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

pykwasm/src/pykwasm/binary/combinators.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
from .utils import A, InputStream, Parser
1010

1111

12-
def iterate(f: Parser[A], s: InputStream) -> list[A]:
13-
results = []
14-
while True:
15-
try:
16-
results.append(f(s))
17-
except (WasmParseError, IndexError, ValueError):
18-
break
19-
return results
20-
21-
2212
def sized(p: Parser[A], s: InputStream) -> A:
2313
size = u32(s)
2414
start_pos = s.tell()

0 commit comments

Comments
 (0)