put the new for loop macros under an experimental switch named 'forLoopMacros'

This commit is contained in:
Andreas Rumpf
2018-08-15 17:45:57 +02:00
parent 27e1fbe7db
commit da41fc1801
4 changed files with 13 additions and 5 deletions

View File

@@ -5380,6 +5380,7 @@ type ``system.ForLoopStmt`` can rewrite the entirety of a ``for`` loop:
:test: "nim c $1"
import macros
{.experimental: "forLoopMacros".}
macro enumerate(x: ForLoopStmt): untyped =
expectKind x, nnkForStmt
@@ -5406,6 +5407,10 @@ type ``system.ForLoopStmt`` can rewrite the entirety of a ``for`` loop:
echo a2, " ", b2
Currently for loop macros must be enabled explicitly
via ``{.experimental: "forLoopMacros".}``.
Special Types
=============