"for-loop macros" are no longer an experimental feature (#15288)

This commit is contained in:
Miran 2020-09-08 14:25:25 +02:00 • committed by GitHub
commit c49b88163c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 50 additions and 51 deletions

View file

@ -890,9 +890,8 @@ proc handleCaseStmtMacro(c: PContext; n: PNode; flags: TExprFlags): PNode =
proc semFor(c: PContext, n: PNode; flags: TExprFlags): PNode =
checkMinSonsLen(n, 3, c.config)
if forLoopMacros in c.features:
result = handleForLoopMacro(c, n, flags)
if result != nil: return result
result = handleForLoopMacro(c, n, flags)
if result != nil: return result
openScope(c)
result = n
n[^2] = semExprNoDeref(c, n[^2], {efWantIterator})