Syntax


Comments

// Comment Until End Of Line

/* Comment */

Numbers

Integers

1234
1_000_000

Floats

1.2

Glyphs

Characters ''

'a'
'Σ'

Strings ""

Operators

Symbol

1 + 2

Named `[a-z]\w+

Variables [a-z][a-zA-Z0-9_]{0,49}

Constants _[a-zA-Z0-9_]{0,49}

Types [A-Z][a-zA-Z0-9_]{0,49}

Tags \.[a-zA-Z0-9_]{1,50}

Blocks {}

Collections ()

Modifiers []

Separators ;|\n

Actions

If ?

? condition {[arguments] statements } { else statements }

? {
    condition {[arguments] statements }
    ...
    { else statements }
}

Loop @

@.tag condition {[arguments] statements }

@.tag (statement; condition; increment) { statements }

``break

``continue

Match #

# match {
    condition {[arguments] statements }
    ...
    { else statements }
}

Lambdas `{[arguments] ... }

add : `{[I64 x; I64 y] x + y }
add `sync (1; 2)

Generators ^{[arguments] ... }

gen : ^{[I64 n]
    @ 1 .. n {[x] `yield x }
    `stop
}
it : gen `init 10
`next it