Add try-catch.

This commit is contained in:
Stephen Chung
2020-10-20 23:16:03 +08:00
parent 5ee9dfc5cd
commit 07bdb824fe
12 changed files with 343 additions and 35 deletions

View File

@@ -21,6 +21,8 @@ Keywords List
| `break` | break out of loop iteration | | no | |
| `return` | return value | | no | |
| `throw` | throw exception | | no | |
| `try` | trap exception | | no | |
| `catch` | catch exception | | no | |
| `import` | import module | [`no_module`] | no | |
| `export` | export variable | [`no_module`] | no | |
| `as` | alias for variable export | [`no_module`] | no | |
@@ -55,8 +57,6 @@ Reserved Keywords
| `case` | matching |
| `public` | function/field access |
| `new` | constructor |
| `try` | trap exception |
| `catch` | catch exception |
| `use` | import namespace |
| `with` | scope |
| `module` | module |