new minor language feature: .noSideEffect blocks like .gcsafe blocks

This commit is contained in:
Andreas Rumpf 2018-11-26 23:28:02 +01:00
commit 413580bc04
7 changed files with 30 additions and 12 deletions

View file

@ -1860,7 +1860,7 @@ proc semPragmaBlock(c: PContext, n: PNode): PNode =
for i in 0 ..< pragmaList.len:
case whichPragma(pragmaList.sons[i])
of wLine: setLine(result, pragmaList.sons[i].info)
of wLocks, wGcSafe:
of wLocks, wGcSafe, wNosideeffect:
result = n
result.typ = n.sons[1].typ
of wNoRewrite: