Problem
Without conditionals, Sigil cannot express branching computation and cannot progress toward a general computational core.
This issue adds first-class conditional execution.
Scope
Deliverables
- Grammar productions for
if/else.
- AST node(s) and runtime evaluation logic.
- Tests for true branch, false branch, and nested conditions.
Acceptance Criteria
- Conditional blocks execute correct branch based on expression result.
- Existing scripts continue to parse/execute.
- Parser conflicts are not reintroduced.
Validation Checklist
- Add parser fixtures for indentation and inline/blocked forms (if supported).
- Add runtime branch tests with deterministic outputs.
- Run full examples suite.
Non-goals
- Looping constructs.
- Advanced pattern matching.
- Module/import redesign.
Problem
Without conditionals, Sigil cannot express branching computation and cannot progress toward a general computational core.
This issue adds first-class conditional execution.
Scope
if <expr>: <block> else: <block>Deliverables
if/else.Acceptance Criteria
Validation Checklist
Non-goals