Custom pragmas in proc types (#8205)

This commit is contained in:
cooldome 2018-07-09 12:11:03 +02:00 • committed by Andreas Rumpf
commit dec97924a4
5 changed files with 30 additions and 14 deletions

View file

@ -229,7 +229,8 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo;
for i in 1..<t.sons.len:
fp.add newIdentDefs(t.n[i], t.sons[i])
result.add fp
result.add newNodeI(nkEmpty, info) # pragmas aren't reconstructed yet
result.add if t.n[0].len > 0: t.n[0][pragmasEffects].copyTree
else: newNodeI(nkEmpty, info)
else:
result = mapTypeToBracket("proc", mNone, t, info)
of tyOpenArray: result = mapTypeToBracket("openArray", mOpenArray, t, info)