File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 5353 r'|SemanticAnalyzer\(|ASTPrinter\(\)|\.generate_rust\('
5454)
5555
56+ # Blocks using syntax not yet supported by ProgramExecutor, or continuation
57+ # fragments that depend on variables/names defined in a prior block.
58+ UNSUPPORTED_OR_ORPHAN_RE = re .compile (
59+ r'^\s*match\s+\S' # match/case statement — target variable from prior block
60+ r'|:=' # walrus operator (:= not yet supported)
61+ r'|^\s*@\w+\d' , # decorator with digit suffix (@decorator1) — from prior block
62+ re .MULTILINE ,
63+ )
64+
5665
5766# ---------------------------------------------------------------------------
5867# Block collection
@@ -80,7 +89,7 @@ def _collect_blocks():
8089 code = m .group (2 ).strip ()
8190 if lang in NON_EXECUTABLE or not code :
8291 continue
83- if HOST_PY_RE .search (code ) or PYTHON_API_RE .search (code ):
92+ if HOST_PY_RE .search (code ) or PYTHON_API_RE .search (code ) or UNSUPPORTED_OR_ORPHAN_RE . search ( code ) :
8493 continue
8594 if 'print(' not in code :
8695 continue
You can’t perform that action at this time.
0 commit comments