c2nim compiles again [#9 state:resolved]; better error message for named parameters

This commit is contained in:
Araq 2011-01-09 19:02:06 +01:00
commit dbc5048a9a
8 changed files with 25 additions and 3 deletions

View file

@ -95,6 +95,9 @@ proc getNotFoundError(c: PContext, n: PNode): string =
result = msgKindToString(errTypeMismatch)
for i in countup(1, sonsLen(n) - 1):
#debug(n.sons[i].typ);
if n.sons[i].kind == nkExprEqExpr:
add(result, renderTree(n.sons[i].sons[0]))
add(result, ": ")
add(result, typeToString(n.sons[i].typ))
if i != sonsLen(n) - 1: add(result, ", ")
add(result, ')')