made compiler more robust for idetools; implemented idetools.usages

This commit is contained in:
Araq 2012-07-30 23:07:19 +02:00
commit 674c05f426
11 changed files with 96 additions and 47 deletions

View file

@ -146,14 +146,16 @@ proc PushOwner(owner: PSym) =
proc PopOwner() =
var length = len(gOwners)
if (length <= 0): InternalError("popOwner")
setlen(gOwners, length - 1)
if length > 0: setlen(gOwners, length - 1)
else: InternalError("popOwner")
proc lastOptionEntry(c: PContext): POptionEntry =
result = POptionEntry(c.optionStack.tail)
proc pushProcCon*(c: PContext, owner: PSym) {.inline.} =
if owner == nil: InternalError("owner is nil")
if owner == nil:
InternalError("owner is nil")
return
var x: PProcCon
new(x)
x.owner = owner