Operators and Symbols ==================== {{#include ../links.md}} Operators --------- | Operator | Description | Binary? | Binding direction | | :-----------------------------------------------------------------------------------------: | -------------------------------------- | :--------: | :---------------: | | `+` | add | yes | left | | `-` | 1) subtract
2) negative | yes
no | left
right | | `*` | multiply | yes | left | | `/` | divide | yes | left | | `%` | modulo | yes | left | | `~` | power | yes | left | | `>>` | right bit-shift | yes | left | | `<<` | left bit-shift | yes | left | | `&` | 1) bit-wise _And_
2) boolean _And_ | yes | left | | \| | 1) bit-wise _Or_
2) boolean _Or_ | yes | left | | `^` | 1) bit-wise _Xor_
2) boolean _Xor_ | yes | left | | `=`, `+=`, `-=`, `*=`, `/=`,
`~=`, `%=`, `<<=`, `>>=`, `&=`,
\|=, `^=` | assignments | yes | right | | `==` | 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 | | `&&` | boolean _And_ (short-circuits) | yes | left | | \|\| | boolean _Or_ (short-circuits) | yes | left | | `!` | boolean _Not_ | no | left | | `[` .. `]` | indexing | yes | right | | `.` | 1) property access
2) method call | yes | right | Symbols and Patterns -------------------- | Symbol | Name | Description | | ---------------------------------- | :------------------: | ------------------------------------- | | `;` | semicolon | statement separator | | `,` | comma | list separator | | `:` | colon | [object map] property value separator | | `::` | path | module path separator | | `#{` .. `}` | hash map | [object map] literal | | `"` .. `"` | double quote | [string] | | `'` .. `'` | single quote | [character][string] | | `\` | escape | escape character literal | | `(` .. `)` | parentheses | expression grouping | | `{` .. `}` | braces | block statement | | \| .. \| | pipes | closure | | `[` .. `]` | brackets | [array] literal | | `!` | bang | function call in calling scope | | `//` | comment | line comment | | `/*` .. `*/` | comment | block comment | | `(*` .. `*)` | comment | _reserved_ | | `<` .. `>` | angular brackets | _reserved_ | | `++` | increment | _reserved_ | | `--` | decrement | _reserved_ | | `..` | range | _reserved_ | | `...` | range | _reserved_ | | `**` | exponentiation | _reserved_ | | `#` | hash | _reserved_ | | `@` | at | _reserved_ | | `$` | dollar | _reserved_ | | `=>` | double arrow | _reserved_ | | `->` | arrow | _reserved_ | | `<-` | left arrow | _reserved_ | | `===` | strict equals to | _reserved_ | | `!==` | strict not equals to | _reserved_ | | `:=` | assignment | _reserved_ | | `::<` .. `>` | turbofish | _reserved_ |