implements 'defer'
This commit is contained in:
parent
85d83fd8cb
commit
e27ab36731
12 changed files with 45 additions and 20 deletions
|
|
@ -47,7 +47,8 @@ Realtime support
|
|||
================
|
||||
|
||||
To enable realtime support, the symbol `useRealtimeGC`:idx: needs to be
|
||||
defined. With this switch the GC supports the following operations:
|
||||
defined via ``--define:useRealtimeGC`` (you can put this into your config
|
||||
file as well). With this switch the GC supports the following operations:
|
||||
|
||||
.. code-block:: nim
|
||||
proc GC_setMaxPause*(MaxPauseInUs: int)
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ exceptBlock = 'except' colcom stmt
|
|||
forStmt = 'for' (identWithPragma ^+ comma) 'in' expr colcom stmt
|
||||
blockStmt = 'block' symbol? colcom stmt
|
||||
staticStmt = 'static' colcom stmt
|
||||
deferStmt = 'defer' colcom stmt
|
||||
asmStmt = 'asm' pragma? (STR_LIT | RSTR_LIT | TRIPLE_STR_LIT)
|
||||
genericParam = symbol (comma symbol)* (colon expr)? ('=' optInd expr)?
|
||||
genericParamList = '[' optInd
|
||||
|
|
@ -182,7 +183,7 @@ simpleStmt = ((returnStmt | raiseStmt | yieldStmt | discardStmt | breakStmt
|
|||
| includeStmt | commentStmt) / exprStmt) COMMENT?
|
||||
complexOrSimpleStmt = (ifStmt | whenStmt | whileStmt
|
||||
| tryStmt | finallyStmt | exceptStmt | forStmt
|
||||
| blockStmt | staticStmt | asmStmt
|
||||
| blockStmt | staticStmt | deferStmt | asmStmt
|
||||
| 'proc' routine
|
||||
| 'method' routine
|
||||
| 'iterator' routine
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
addr and as asm atomic
|
||||
bind block break
|
||||
case cast const continue converter
|
||||
discard distinct div do
|
||||
defer discard distinct div do
|
||||
elif else end enum except export
|
||||
finally for from
|
||||
generic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue