Problem
A basic if / else construct can cover simple branching, but it does not provide a clean way to express multiple ordered conditions in one chain. Without else_if, scripts must nest conditionals manually, which makes branching logic harder to read and maintain.
Specification
Add support for standalone else_if chaining in script files.
Acceptance criteria:
- Scripts can use
else_if as an additional branch within an if / else_if / else chain.
else_if is treated as its own conditional construct and does not need to invoke or reuse the existing if implementation internally.
- At most one branch in the full chain executes.
else_if remains compatible with the existing end_if terminator for the chain.
- Nested control-flow blocks remain parseable and unambiguous.
- Invalid or misplaced
else_if usage fails with a clear error message.
Motivation
This would let scripts express multi-branch decisions more naturally without forcing extra nesting or duplicated control-flow structure.
Problem
A basic
if/elseconstruct can cover simple branching, but it does not provide a clean way to express multiple ordered conditions in one chain. Withoutelse_if, scripts must nest conditionals manually, which makes branching logic harder to read and maintain.Specification
Add support for standalone
else_ifchaining in script files.Acceptance criteria:
else_ifas an additional branch within anif/else_if/elsechain.else_ifis treated as its own conditional construct and does not need to invoke or reuse the existingifimplementation internally.else_ifremains compatible with the existingend_ifterminator for the chain.else_ifusage fails with a clear error message.Motivation
This would let scripts express multi-branch decisions more naturally without forcing extra nesting or duplicated control-flow structure.