mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-26 02:21:57 +00:00
put the new for loop macros under an experimental switch named 'forLoopMacros'
This commit is contained in:
@@ -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
|
||||
=============
|
||||
|
||||
|
||||
Reference in New Issue
Block a user