Skip to content

Repeat Statements

Benedict Albrecht edited this page May 20, 2026 · 4 revisions

Repeat Statements

The repeat statement indicates that the syntax within it can repeat multiple times in succession. An empty string (zero occurrences) is also accepted.

Syntax

<? ... ?>

Example

A function with a comma-separated parameter list:

<:function:> function <<name>> ( <? <<var>> <| , <||> |> ?> ) { <---> } <:>

This matches:

  • function myFunc ( ) { ... } — zero parameters
  • function myFunc ( x ) { ... } — one parameter
  • function myFunc ( x , y ) { ... } — multiple parameters
  • function myFunc ( x , y , z ) { ... } — any number of parameters

The <| , <||> |> inside the repeat provides an optional comma separator between repetitions.

Clone this wiki locally