docgen: more newlines in the output to support primitive postprocessors

This commit is contained in:
Araq 2013-08-29 23:18:02 +02:00
commit 5f943cf4bc
3 changed files with 4 additions and 18 deletions

View file

@ -35,21 +35,6 @@ proc opSlurp*(file: string, info: TLineInfo, module: PSym): string =
result = ""
LocalError(info, errCannotOpenFile, file)
proc opTypeTrait*(n: PNode, context: PSym): PNode =
## XXX: This should be pretty much guaranteed to be true
# by the type traits procs' signatures, but until the
# code is more mature it doesn't hurt to be extra safe
internalAssert n.len >= 2 and n.sons[1].kind == nkSym
let typ = n.sons[1].sym.typ.skipTypes({tyTypeDesc})
case n.sons[0].sym.name.s.normalize
of "name":
result = newStrNode(nkStrLit, typ.typeToString(preferExported))
result.typ = newType(tyString, context)
result.info = n.info
else:
internalAssert false
when false:
proc opExpandToAst*(c: PEvalContext, original: PNode): PNode =
var