diff options
-rw-r--r-- | compiler/vmdef.nim | 3 | ||||
-rw-r--r-- | compiler/vmdeps.nim | 15 | ||||
-rw-r--r-- | lib/packages/docutils/rstgen.nim | 4 |
3 files changed, 4 insertions, 18 deletions
diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim index 050caa65c..515f2975b 100644 --- a/compiler/vmdef.nim +++ b/compiler/vmdef.nim @@ -122,7 +122,8 @@ type opcLdImmInt, # dest = immediate value opcWrGlobal, opcWrGlobalRef, - opcSetType # dest.typ = types[Bx] + opcSetType, # dest.typ = types[Bx] + opcTypeTrait TBlock* = object label*: PSym diff --git a/compiler/vmdeps.nim b/compiler/vmdeps.nim index 0e90a9b14..2a40276d1 100644 --- a/compiler/vmdeps.nim +++ b/compiler/vmdeps.nim @@ -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 diff --git a/lib/packages/docutils/rstgen.nim b/lib/packages/docutils/rstgen.nim index a393943fb..364f847cc 100644 --- a/lib/packages/docutils/rstgen.nim +++ b/lib/packages/docutils/rstgen.nim @@ -265,12 +265,12 @@ proc renderHeadline(d: PDoc, n: PRstNode, result: var string) = d.tocPart[length].header = tmp dispA(d.target, result, - "<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2_toc\">$3</a></h$1>", + "\n<h$1><a class=\"toc-backref\" id=\"$2\" href=\"#$2_toc\">$3</a></h$1>", "\\rsth$4{$3}\\label{$2}\n", [$n.level, d.tocPart[length].refname, tmp, $chr(n.level - 1 + ord('A'))]) else: - dispA(d.target, result, "<h$1 id=\"$2\">$3</h$1>", + dispA(d.target, result, "\n<h$1 id=\"$2\">$3</h$1>", "\\rsth$4{$3}\\label{$2}\n", [ $n.level, refname, tmp, $chr(n.level - 1 + ord('A'))]) |