diff options
author | Araq <rumpf_a@web.de> | 2015-09-14 12:46:43 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-14 12:46:43 +0200 |
commit | 48d8728e406155f33898098ef7df3165591babe8 (patch) | |
tree | 7772ac10ce42ddf91f3f12a7fcf36cb7a4706ad6 /doc/manual | |
parent | 64d9a5bc851cddb20c07d43d4b048cc13c45bda7 (diff) | |
download | Nim-48d8728e406155f33898098ef7df3165591babe8.tar.gz |
documented implicit compileTime procs
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/pragmas.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/manual/pragmas.txt b/doc/manual/pragmas.txt index 8166994a9..68a88f865 100644 --- a/doc/manual/pragmas.txt +++ b/doc/manual/pragmas.txt @@ -72,7 +72,20 @@ compileTime pragma ------------------ The ``compileTime`` pragma is used to mark a proc or variable to be used at compile time only. No code will be generated for it. Compile time procs are -useful as helpers for macros. +useful as helpers for macros. Since version 0.12.0 of the language, a proc +that uses ``system.NimNode`` within its parameter types is implictly declared +``compileTime``: + +.. code-block:: nim + proc astHelper(n: NimNode): NimNode = + result = n + +Is the same as: + +.. code-block:: nim + proc astHelper(n: NimNode): NimNode {.compileTime.} = + result = n + noReturn pragma --------------- |