Reference

Loops

Mutant currently supports the C-style for loop form. Syntax for (init; condition; post) { body } Each clause is optional, so for (;;) is an infinite loop. Control Statements break exits the loop immediately. continue skips to the next iteration. Notes There is no while or do-while form in the current spec.

Source repo
aoiflux/mutant
Source path
parser/parse_stmts.go
Last reviewed
2026-07-03
Freshness tier
high

Mutant currently supports the C-style for loop form.

Syntax

for (init; condition; post) {
  body
}

Each clause is optional, so for (;;) is an infinite loop.

Control Statements

  • break exits the loop immediately.
  • continue skips to the next iteration.

Notes

There is no while or do-while form in the current spec.