2.8 KiB
2.8 KiB
Operators and Symbols
{{#include ../links.md}}
Operators
Operator | Description | Binary? | Binding direction |
---|---|---|---|
+ |
Add | Yes | Left |
- |
Subtract, Minus | Yes/No | Left |
* |
Multiply | Yes | Left |
/ |
Divide | Yes | Left |
% |
Modulo | Yes | Left |
~ |
Power | Yes | Left |
>> |
Right bit-shift | Yes | Left |
<< |
Left bit-shift | Yes | Left |
& |
Bit-wise And, Boolean And | Yes | Left |
| |
Bit-wise Or, Boolean Or | Yes | Left |
^ |
Bit-wise Xor, Boolean Xor | Yes | Left |
== |
Equals to | Yes | Left |
~= |
Not equals to | Yes | Left |
> |
Greater than | Yes | Left |
>= |
Greater than or equals to | Yes | Left |
< |
Less than | Yes | Left |
<= |
Less than or equals to | Yes | Left |
>= |
Greater than or equals to | Yes | Left |
&& |
Boolean And (short-circuits) | Yes | Left |
|| |
Boolean Or (short-circuits) | Yes | Left |
! |
Boolean Not | No | Left |
[ .. ] |
Indexing | Yes | Right |
. |
Property access, Method call | Yes | Right |
Symbols
Symbol | Description |
---|---|
: |
Property value separator |
:: |
Module path separator |
# |
Reserved |
=> |
Reserved |
-> |
Reserved |
<- |
Reserved |
=== |
Reserved |
!== |
Reserved |
:= |
Reserved |
::< .. > |
Reserved |
@ |
Reserved |
(* .. *) |
Reserved |