You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P-C1] Parser: bare except clauses swallow all errors #1
In src/flow/parser.py (lines ~2027, 2047), the backtracking logic for generic types and struct literals uses bare except: clauses. These catch everything — including KeyboardInterrupt, SystemExit, MemoryError, and internal Python bugs.
If the parser has a genuine bug inside these blocks, it will be silently hidden, and the parser will misinterpret the input.
# Line 2027except:
# Restore state - this was probably a comparisonself.lexer.pos=save_pos
...
returnVariable(name)
Impact
Internal bugs silently swallowed
Ctrl+C during parsing is caught and ignored
sys.exit() calls inside these blocks are prevented
Fix
Replace bare except: with except Exception: (or better, a specific parser exception type).
Activity
Add GH issue sync script and mark #1/#2
godofecht commentedon Feb 9, 2026
Fixed: bare except clauses replaced with
except SyntaxError:in parser backtracking logic.flowc: prove the whole compiler compiles itself, three generations deep