Skip to content

Commit ce44d8c

Browse files
authored
Add 'is' keyword. (#516)
1 parent cd8733a commit ce44d8c

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

docs/language/syntax.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,22 @@ Identifiers are names that identify globals, locals, functions, classes, librari
6868

6969
- Identifier names can contain only letters, numbers, dashes (-) and underscores (\_), but cannot contain
7070
spaces. Dashes must be enclosed by letters or numbers. Dashes are equated with underscores. That is,
71-
`foo-bar` and `foo_bar` refere to the same entity. When possible, prefer dashes.
71+
`foo-bar` and `foo_bar` refer to the same entity. When possible, prefer dashes.
7272
- Identifiers need to start with a letter or an underscore (\_), but not with a number. The following characters can be alphanumeric or underscore.
7373
- Toit identifiers are case-sensitive.
7474
- Identifier names cannot be the same as keywords and built-in functions in Toit.
7575

7676
The following Toit keywords cannot be used for naming identifiers:
7777

7878
```txt
79-
as abstract assert
80-
break class continue
81-
else false finally
82-
for if import
83-
export null return
84-
static true try
85-
while or and not
79+
and as abstract
80+
assert break class
81+
continue else export
82+
false finally for
83+
if import is
84+
not null or
85+
return static true
86+
try while
8687
```
8788

8889
In addition to these keywords, there are some "pseudo keywords" - like

0 commit comments

Comments
 (0)