improved expandimportc tool

This commit is contained in:
rumpf_a@web.de 2009-12-20 23:54:19 +01:00
commit 9dda24e475
6 changed files with 83 additions and 33 deletions

View file

@ -1774,13 +1774,11 @@ proc genConstSimpleList(p: BProc, n: PNode): PRope =
app(result, '}' & tnl)
proc genConstExpr(p: BProc, n: PNode): PRope =
var
cs: TBitSet
d: TLoc
case n.Kind
of nkHiddenStdConv, nkHiddenSubConv:
result = genConstExpr(p, n.sons[1])
of nkCurly:
var cs: TBitSet
toBitSet(n, cs)
result = genRawSetData(cs, int(getSize(n.typ)))
of nkBracket, nkPar:
@ -1788,5 +1786,6 @@ proc genConstExpr(p: BProc, n: PNode): PRope =
result = genConstSimpleList(p, n)
else:
# result := genLiteral(p, n)
var d: TLoc
initLocExpr(p, n, d)
result = rdLoc(d)