Skip to content

Feature: add standalone else_if chaining for conditionals #11

Description

@nholthaus

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions