|
4 | 4 |
|
5 | 5 | Saki supports following keywords: |
6 | 6 |
|
7 | | -| Keyword | Description | |
8 | | -| -------------------- | ------------------------------------------------------------ | |
9 | | -| `import` | Module import | |
10 | | -| `pub` | Public modifier | |
11 | | -| `def` | Function definition | |
12 | | -| `impl` | Implementation block | |
13 | | -| `operator` | Operator declaration | |
14 | | -| `prefix` | Prefix modifier (unary operator) | |
15 | | -| `postfix` | Postfix modifier (unary operator) | |
16 | | -| `left-assoc` | Left association modifier (binary operator) | |
17 | | -| `right-assoc` | Right association modifier (binary operator) | |
18 | | -| `tighter-than` | Precedence partial-order modifier (binary operator) | |
19 | | -| `looser-than` | Precedence partial-order modifier (binary operator) | |
20 | | -| `same-as` | Precedence partial-order modifier (binary operator) | |
21 | | -| `let` | Let binding | |
22 | | -| `instance` | Instance value | |
23 | | -| `enum` | Enum type (Algebraic Data Type) | |
24 | | -| `record` | Record type | |
25 | | -| `universe` | Universe | |
26 | | -| `self` | Self instance | |
27 | | -| `Self` | Self type | |
| 7 | +| Keyword | Description | |
| 8 | +|----------------------|------------------------------------------------------------------| |
| 9 | +| `import` | Module import | |
| 10 | +| `pub` | Public modifier | |
| 11 | +| `def` | Function definition | |
| 12 | +| `impl` | Implementation block | |
| 13 | +| `operator` | Operator declaration | |
| 14 | +| `prefix` | Prefix modifier (unary operator) | |
| 15 | +| `postfix` | Postfix modifier (unary operator) | |
| 16 | +| `left-assoc` | Left association modifier (binary operator) | |
| 17 | +| `right-assoc` | Right association modifier (binary operator) | |
| 18 | +| `tighter-than` | Precedence partial-order modifier (binary operator) | |
| 19 | +| `looser-than` | Precedence partial-order modifier (binary operator) | |
| 20 | +| `same-as` | Precedence partial-order modifier (binary operator) | |
| 21 | +| `let` | Let binding | |
| 22 | +| `instance` | Instance value | |
| 23 | +| `enum` | Enum type (Algebraic Data Type) | |
| 24 | +| `record` | Record type | |
| 25 | +| `universe` | Universe | |
| 26 | +| `self` | Self instance | |
| 27 | +| `Self` | Self type | |
28 | 28 | | `this` | Current subject (such as recursive access in anonymous function) | |
29 | | -| `forall` / `Π` / `∀` | Forall / dependent pi type | |
30 | | -| `exists` / `Σ` / `∃` | Exists / dependent sigma type | |
31 | | -| `if` | If-expression | |
32 | | -| `then` | Then branch in if-expression | |
33 | | -| `else` | Else branch in if-expression | |
34 | | -| `match` | Match-expression | |
35 | | -| `case` | Case clause in match-expression | |
| 29 | +| `forall` / `Π` / `∀` | Forall / dependent pi type | |
| 30 | +| `exists` / `Σ` / `∃` | Exists / dependent sigma type | |
| 31 | +| `if` | If-expression | |
| 32 | +| `then` | Then branch in if-expression | |
| 33 | +| `else` | Else branch in if-expression | |
| 34 | +| `match` | Match-expression | |
| 35 | +| `case` | Case clause in match-expression | |
36 | 36 |
|
37 | 37 | ## Identifiers |
38 | 38 |
|
39 | | -| Identifier | Example | Description | |
40 | | -| :----------------------------------------------------------: | :------------------------------: | :-----------------------------------------------: | |
| 39 | +| Identifier | Example | Description | |
| 40 | +|:----------------------------------------------------------------------------:|:--------------------------------:|:-------------------------------------------------:| |
41 | 41 | | `camelCaseWithEnglishOrGreekLetters` / `withOptionalPostfixSingleQuotation'` | `value`, `α`, `παράδειγμα`, `n'` | Values | |
42 | | -| `PascalCaseInEnglish` / A single blackboard bold letter | `Nat`, `ℕ` | Types | |
43 | | -| `'PascalCaseWithAPrefixedSingleQuotation` | `'Type`, `'Runnable` | Contract universes | |
44 | | -| `#Universe` | `#Universe` | The universe that all contract universes lives in | |
45 | | -| `'Type_n` / `'Typeₙ` | `'Type_3`, `'Type₃` | Higher-level universes | |
| 42 | +| `PascalCaseInEnglish` / A single blackboard bold letter | `Nat`, `ℕ` | Types | |
| 43 | +| `'PascalCaseWithAPrefixedSingleQuotation` | `'Type`, `'Runnable` | Contract universes | |
| 44 | +| `#Universe` | `#Universe` | The universe that all contract universes lives in | |
| 45 | +| `'Type_n` / `'Typeₙ` | `'Type_3`, `'Type₃` | Higher-level universes | |
0 commit comments