You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Languages typically classify keywords in three categories—strict, soft, and reserved.
6
+
7
+
## Strict keywords
8
+
9
+
Strict keywords can only be used where specified by the language and can never be used as identifiers. In Grain, these keywords are:
10
+
11
+
```ebnf
12
+
keyword =
13
+
| "assert"
14
+
| "break"
15
+
| "continue"
16
+
| "else"
17
+
| "enum"
18
+
| "except"
19
+
| "exception"
20
+
| "export"
21
+
| "fail"
22
+
| "false"
23
+
| "for"
24
+
| "foreign"
25
+
| "from"
26
+
| "if"
27
+
| "import"
28
+
| "let"
29
+
| "match"
30
+
| "mut"
31
+
| "primitive"
32
+
| "rec"
33
+
| "record"
34
+
| "throw"
35
+
| "true"
36
+
| "type"
37
+
| "void"
38
+
| "wasm"
39
+
| "when"
40
+
| "while"
41
+
;
42
+
```
43
+
44
+
## Soft keywords
45
+
46
+
Soft keywords are sometimes allowed be used as an identifier, depending on the context.
47
+
48
+
Grain currently has no soft keywords.
49
+
50
+
## Reserved keywords
51
+
52
+
Reserved keywords are keywords that are not yet used by the language, but are disallowed as identifiers to allow programs to continue to be compatible with future versions of `grainc`.
0 commit comments