MCPcopy Create free account
hub / github.com/coooodeer/parse-rust / python_fallback_runner

Function python_fallback_runner

benches/benchmark_common.py:362–375  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360
361
362def python_fallback_runner():
363 from parse import compile as py_compile, with_pattern as py_with_pattern
364
365 @py_with_pattern(r"[ab]")
366 def ab(text):
367 return {"a": 1, "b": 2}[text]
368
369 parser = py_compile("test {result:ab}", extra_types={"ab": ab})
370
371 def run(lines):
372 for line in lines:
373 parser.parse(line)
374
375 return run
376
377
378def rust_fallback_runner():

Callers 1

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected