non-nil AST; continue after errors for IDE support

This commit is contained in:
Araq 2011-02-12 19:24:20 +01:00
commit 5b28d08203
84 changed files with 678 additions and 722 deletions

View file

@ -1439,7 +1439,7 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
of mEcho: genEcho(p, e)
of mArrToSeq: genArrToSeq(p, e, d)
of mNLen..mNError:
liMessage(e.info, errCannotGenerateCodeForX, e.sons[0].sym.name.s)
localError(e.info, errCannotGenerateCodeForX, e.sons[0].sym.name.s)
else: internalError(e.info, "genMagicExpr: " & $op)
proc genConstExpr(p: BProc, n: PNode): PRope
@ -1605,7 +1605,7 @@ proc expr(p: BProc, e: PNode, d: var TLoc) =
var sym = e.sym
case sym.Kind
of skMethod:
if sym.ast.sons[codePos] == nil:
if sym.ast.sons[codePos].kind == nkEmpty:
# we cannot produce code for the dispatcher yet:
fillProcLoc(sym)
genProcPrototype(p.module, sym)