Render deprecated pragmas (#8886)

* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
This commit is contained in:
LemonBoy 2019-06-03 10:15:20 +02:00 • committed by Andreas Rumpf
commit 7d217a71d3
21 changed files with 180 additions and 117 deletions

View file

@ -120,6 +120,12 @@ proc whichPragma*(n: PNode): TSpecialWord =
let key = if n.kind in nkPragmaCallKinds and n.len > 0: n.sons[0] else: n
if key.kind == nkIdent: result = whichKeyword(key.ident)
proc findPragma*(n: PNode, which: TSpecialWord): PNode =
if n.kind == nkPragma:
for son in n:
if whichPragma(son) == which:
return son
proc effectSpec*(n: PNode, effectType: TSpecialWord): PNode =
for i in 0 ..< sonsLen(n):
var it = n.sons[i]