put the new for loop macros under an experimental switch named 'forLoopMacros'
This commit is contained in:
parent
27e1fbe7db
commit
da41fc1801
4 changed files with 13 additions and 5 deletions
|
|
@ -720,8 +720,9 @@ proc handleForLoopMacro(c: PContext; n: PNode): PNode =
|
|||
proc semFor(c: PContext, n: PNode): PNode =
|
||||
checkMinSonsLen(n, 3, c.config)
|
||||
var length = sonsLen(n)
|
||||
result = handleForLoopMacro(c, n)
|
||||
if result != nil: return result
|
||||
if forLoopMacros in c.features:
|
||||
result = handleForLoopMacro(c, n)
|
||||
if result != nil: return result
|
||||
openScope(c)
|
||||
result = n
|
||||
n.sons[length-2] = semExprNoDeref(c, n.sons[length-2], {efWantIterator})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue