Skip to content

Commit

Permalink
Update grammar.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cetio authored May 21, 2024
1 parent f07bfbf commit a00dcf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specification/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ The following operators are defined as op-assign, meaning that they perform the
| Operator |
|----------|
| `+=` `-=` `*=` `/=` `%=` `^^=` `~=` `[..]=` |
| `<<=` `>>=` `<<<=` `^=` `&=` `\|=` |
| `<<=` `>>=` `<<<=` `^=` `&=` `\|=` `[x]=` |

#### Operator Overloading

Expand Down Expand Up @@ -131,7 +131,7 @@ Almost all operators may be overloaded in types, this is done by specifying the
| `unary $()` | `$` Range length operator. |
| `nnary read(alias F = void)()` | `.` Field or variable reading, optionally takes a field symbol being read, otherwise `this` is being read. |
| `nnary write(alias F = void)()` | `.` Field or variable writing, optionally takes a field symbol being written, otherwise `this` is being written. |
| `nnary call(alias F)()` | `.` Function calls, taking the symbol of what function is being called. **Will not overload UFCS calls!** |
| `nnary call(alias F, ARGS...)()` | `.` Function calls, taking the symbol of what function is being called. **Will not overload UFCS calls!** |

All operators with a respective assignment operator may have that assignment operator overloaded by appending `=` before the parameters in the signature, like in `binary >>=(T)(T val)`.

Expand Down

0 comments on commit a00dcf9

Please sign in to comment.