Block expressions (#6695)
* enabled parsing of block expressions * added test case; closes #3827 * adjusted grammar doc strings * updated grammar in docs
This commit is contained in:
parent
4c7dda37a2
commit
40a6caeed8
3 changed files with 18 additions and 3 deletions
|
|
@ -83,7 +83,8 @@ paramListColon = paramList? (':' optInd typeDesc)?
|
|||
doBlock = 'do' paramListArrow pragmas? colcom stmt
|
||||
procExpr = 'proc' paramListColon pragmas? ('=' COMMENT? stmt)?
|
||||
distinct = 'distinct' optInd typeDesc
|
||||
expr = (ifExpr
|
||||
expr = (blockExpr
|
||||
| ifExpr
|
||||
| whenExpr
|
||||
| caseExpr
|
||||
| tryExpr)
|
||||
|
|
@ -141,6 +142,7 @@ tryExpr = 'try' colcom stmt &(optInd 'except'|'finally')
|
|||
exceptBlock = 'except' colcom stmt
|
||||
forStmt = 'for' (identWithPragma ^+ comma) 'in' expr colcom stmt
|
||||
blockStmt = 'block' symbol? colcom stmt
|
||||
blockExpr = 'block' symbol? colcom stmt
|
||||
staticStmt = 'static' colcom stmt
|
||||
deferStmt = 'defer' colcom stmt
|
||||
asmStmt = 'asm' pragma? (STR_LIT | RSTR_LIT | TRIPLE_STR_LIT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue