parent
fd5c8ef208
commit
f0cfc95372
2 changed files with 2 additions and 2 deletions
|
|
@ -414,7 +414,7 @@ AST:
|
|||
Example code:
|
||||
|
||||
.. code-block:: nim
|
||||
macro genRepeatEcho(): stmt =
|
||||
macro genRepeatEcho() =
|
||||
result = newNimNode(nnkStmtList)
|
||||
|
||||
var forStmt = newNimNode(nnkForStmt) # generate a for statement
|
||||
|
|
|
|||
|
|
@ -1710,7 +1710,7 @@ e.g. when rewriting term to same term plus extra content.
|
|||
e.g. with given example ``echo("ab")`` will be rewritten just once:
|
||||
|
||||
.. code-block:: nim
|
||||
template pwnEcho{echo(x)}(x: expr) =
|
||||
template pwnEcho{echo(x)}(x: untyped) =
|
||||
{.noRewrite.}: echo("pwned!")
|
||||
|
||||
echo "ab"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue