Skip to content

Feature: add while loop support #4

@nholthaus

Description

@nholthaus

Problem

The scripting language supports counted for loops, but it does not support condition-based repetition. This makes it awkward or impossible to express scripts that need to keep running until a runtime condition changes.

Specification

Add support for a while loop construct in script files.

Acceptance criteria:

  • Scripts can begin a condition-based loop with a while statement.
  • Scripts can terminate that loop with a matching end marker.
  • The loop condition is evaluated on each iteration.
  • Nested loop/control-flow blocks remain parseable and unambiguous.
  • Invalid or unmatched loop blocks fail with a clear error message.

Motivation

This would allow scripts to model open-ended repetition driven by runtime state rather than fixed iteration counts.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions