Skip to content

Commit 60ebac7

Browse files
committed
feat(reference): Lexical Structure—Operators
1 parent 4d1f046 commit 60ebac7

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

docs_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ docs_groups:
100100
- reference/lexical_structure/keywords
101101
- reference/lexical_structure/identifiers
102102
- reference/lexical_structure/literals
103-
# - reference/lexical_structure/operators
103+
- reference/lexical_structure/operators
104104
# - reference/lexical_structure/delimiters
105105
# - constructs/bindings
106106
# - constructs/numbers
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Operators
3+
---
4+
5+
The following tokens are considered operators.
6+
7+
```ebnf
8+
OPERATOR =
9+
| "..."
10+
| "."
11+
| "::"
12+
| ":"
13+
| ":="
14+
| "=="
15+
| "="
16+
| "^"
17+
| "<"
18+
| "<<"
19+
| ">"
20+
| "<="
21+
| ">="
22+
| "++"
23+
| "+"
24+
| "-"
25+
| "*"
26+
| "/"
27+
| "%"
28+
| "&"
29+
| "&&"
30+
| "|"
31+
| "||"
32+
| "!"
33+
| "is"
34+
| "isnt" ;
35+
```
36+
37+
It's worth noting that `>>` and `>>>` are also considered operators, but due to an ambiguity when writing a nested type like `List<Option<a>>`, the `>>` and `>>>` operators are composed of multiple `>` tokens.

0 commit comments

Comments
 (0)