Skip to content

[Feature] add break flow statement #99

@pabloosabaterr

Description

@pabloosabaterr

Description

Add support for the break statement from end to end.
break transfers control to the end of the nearest enclosing loop. It can only be used inside loops; using it elsewhere should produce an error. (Switch statements are not yet supported.)

Example

while (condition) {
    if (condition) {
        break;
    }
}

Future Considerations

  • Extend support to switch statements in future updates.

Benefits

  • Enhances language expressiveness.
  • Provides better flow control in loops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions