saker.build Documentation TaskDoc JavaDoc

Operators

The articles in this section specify the usable operators in the language.

Precedence table

The following table defines the order of evaluation when multiple operators present in an expression.

OperatorReference
Evaluated first(expr)Parentheses
$exprDereference
[idx]Subscript
~ - !Bitwise negate, Unary minus, Boolean negate
* / %Mathematic operators
+ -Addition, Mathematic operators
<< >>Bitwise shift operators
< <= >= >Numeric comparison
== !=Equality comparison
&Bitwise operators
^Bitwise operators
|Bitwise operators
&&Boolean operators
||Boolean operators
cond ? tv : fvTernary
Evaluated lastvar = exprAssignment

Syntax lookup

The following operators are available in the language based on their syntax: