Skip to main content

Language Reference

Expression

Keyword

KeywordDescription
as
break
case
continue
def
else
enum
export
for
from
func
if
import
mut
pub
ref
return
spec
struct
switch
when
where
while

Identifier

Constant

Type

Variable

Label

Lifetime

Literal

Boolean

Number

Binary
Octal
Decimal
Hexadecimal

String

Identifier
Symbol
Text

Operator

Comparison Operators

OperatorDescription
Expr :: Expr
expr == expr
Expr !: Expr
expr != expr
expr < expr
Expr <: Expr
expr <= expr
expr > expr
Expr >: Expr
expr >= expr

Boolean Operators

OperatorDescription
!expr
expr and expr
expr or expr

Bitwise Operators

OperatorDescription
~expr
expr & expr
iden &= expr
expr | expr
iden |= expr
expr ^ expr
iden ^= expr
expr >> expr
iden >>= expr
expr << expr
iden <<= expr
expr <<$ expr
iden <<$= expr

Arithmetic Operators

OperatorDescription
expr + expr
iden += expr
expr +% expr
iden +%= expr
expr +$ expr
iden +$= expr
expr - expr
iden -= expr
expr -% expr
iden -%= expr
expr -$ expr
iden -$= expr
expr * expr
iden *= expr
expr *% expr
iden *%= expr
expr *$ expr
iden *$= expr
expr / expr
iden /= expr

Punctuation

Comment

Delimiter

Bracket