summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-07-01 21:47:53 +0200
committerAraq <rumpf_a@web.de>2014-07-01 21:47:53 +0200
commit212293197fe9e3584f8c36142935ce6d6f5b30c3 (patch)
tree6812ce51634ed3b43233fa7f6d61c50101883efe /doc
parent405cd7d1fbc92189e70763b8f22e888559214451 (diff)
downloadNim-212293197fe9e3584f8c36142935ce6d6f5b30c3.tar.gz
fixes #1161
Diffstat (limited to 'doc')
-rw-r--r--doc/grammar.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 47ae095f6..a54428678 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -86,7 +86,7 @@ distinct = 'distinct' optInd typeDesc
 expr = (ifExpr
       | whenExpr
       | caseExpr
-      | tryStmt)
+      | tryExpr)
       / simpleExpr
 typeKeyw = 'var' | 'ref' | 'ptr' | 'shared' | 'type' | 'tuple'
          | 'proc' | 'iterator' | 'distinct' | 'object' | 'enum'
@@ -135,6 +135,9 @@ caseStmt = 'case' expr ':'? COMMENT?
 tryStmt = 'try' colcom stmt &(IND{=}? 'except'|'finally')
            (IND{=}? 'except' exprList colcom stmt)*
            (IND{=}? 'finally' colcom stmt)?
+tryExpr = 'try' colcom stmt &(optInd 'except'|'finally')
+           (optInd 'except' exprList colcom stmt)*
+           (optInd 'finally' colcom stmt)?
 exceptBlock = 'except' colcom stmt
 forStmt = 'for' (identWithPragma ^+ comma) 'in' expr colcom stmt
 blockStmt = 'block' symbol? colcom stmt