parent
c658de24b0
commit
1ef945668d
3 changed files with 30 additions and 9 deletions
|
|
@ -3834,10 +3834,10 @@ The proc expression represented by the `do` block is appended to the routine
|
|||
call as the last argument. In calls using the command syntax, the `do` block
|
||||
will bind to the immediately preceding expression rather than the command call.
|
||||
|
||||
`do` with a parameter list corresponds to an anonymous `proc`, however
|
||||
`do` without parameters is treated as a normal statement list. This allows
|
||||
macros to receive both indented statement lists as an argument in inline
|
||||
calls, as well as a direct mirror of Nim's routine syntax.
|
||||
`do` with a parameter list or pragma list corresponds to an anonymous `proc`,
|
||||
however `do` without parameters or pragmas is treated as a normal statement
|
||||
list. This allows macros to receive both indented statement lists as an
|
||||
argument in inline calls, as well as a direct mirror of Nim's routine syntax.
|
||||
|
||||
.. code-block:: nim
|
||||
# Passing a statement list to an inline macro:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue