aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/SYNTAX.md6
-rw-r--r--docs/book/SYNTAX.html6
2 files changed, 4 insertions, 8 deletions
diff --git a/docs/SYNTAX.md b/docs/SYNTAX.md
index 4e57b04..c6e96f6 100644
--- a/docs/SYNTAX.md
+++ b/docs/SYNTAX.md
@@ -248,7 +248,7 @@ The following identifiers are in use by the standard prelude:
- logic: `not` `and` `or` `xor` `shl` `shr` `div` `mod` `rem`
- logic: `+` `-` `*` `/` `<` `>` `<=` `>=` `==` `!=` `is`
- async: `async` `await`
-- types: `int` `uint` `float` `i\d+` `u\d+`
+- types: `int` `uint` `float` `i[\d+]` `u[\d+]`
- `f32` `f64` `f128`
- `dec64` `dec128`
- types: `bool` `byte` `char` `str`
@@ -364,9 +364,7 @@ Signature ::= Ident Generics? ('(' Type (',' Type)* ')')? (':' Type)?
```
If ::= 'if' Expr 'then' Body ('elif' Expr 'then' Body)* ('else' Body)?
When ::= 'when' Expr 'then' Body ('elif' Expr 'then' Body)* ('else' Body)?
-Try ::= 'try' Body
- ('except' Ident ('as' Ident)? (',' Ident ('as' Ident)?)*) 'then' Body)+
- ('finally' Body)?
+Try ::= 'try' Body ('with' Pattern (',' Pattern)* 'then' Body)+ ('finally' Body)?
Match ::= 'match' Expr ('of' Pattern (',' Pattern)* ('where' Expr)? 'then' Body)+
While ::= 'while' Expr 'do' Body
For ::= 'for' Pattern 'in' Expr 'do' Body
diff --git a/docs/book/SYNTAX.html b/docs/book/SYNTAX.html
index a241b74..4860718 100644
--- a/docs/book/SYNTAX.html
+++ b/docs/book/SYNTAX.html
@@ -378,7 +378,7 @@ of that then ...
<li>logic: <code>not</code> <code>and</code> <code>or</code> <code>xor</code> <code>shl</code> <code>shr</code> <code>div</code> <code>mod</code> <code>rem</code></li>
<li>logic: <code>+</code> <code>-</code> <code>*</code> <code>/</code> <code>&lt;</code> <code>&gt;</code> <code>&lt;=</code> <code>&gt;=</code> <code>==</code> <code>!=</code> <code>is</code></li>
<li>async: <code>async</code> <code>await</code></li>
-<li>types: <code>int</code> <code>uint</code> <code>float</code> <code>i\d+</code> <code>u\d+</code>
+<li>types: <code>int</code> <code>uint</code> <code>float</code> <code>i[\d]+</code> <code>u[\d]+</code>
<ul>
<li><code>f32</code> <code>f64</code> <code>f128</code></li>
<li><code>dec64</code> <code>dec128</code></li>
@@ -482,9 +482,7 @@ Signature ::= Ident Generics? ('(' Type (',' Type)* ')')? (':' Type)?
<h2 id="control-flow"><a class="header" href="#control-flow">Control Flow</a></h2>
<pre><code>If ::= 'if' Expr 'then' Body ('elif' Expr 'then' Body)* ('else' Body)?
When ::= 'when' Expr 'then' Body ('elif' Expr 'then' Body)* ('else' Body)?
-Try ::= 'try' Body
- ('except' Ident ('as' Ident)? (',' Ident ('as' Ident)?)*) 'then' Body)+
- ('finally' Body)?
+Try ::= 'try' Body ('with' Pattern (',' Pattern)* 'then' Body)+ ('finally' Body)?
Match ::= 'match' Expr ('of' Pattern (',' Pattern)* ('where' Expr)? 'then' Body)+
While ::= 'while' Expr 'do' Body
For ::= 'for' Pattern 'in' Expr 'do' Body