compiler refactoring, pass config around explicitly

This commit is contained in:
Andreas Rumpf 2018-05-05 18:47:29 +02:00
commit b7116a28ee
17 changed files with 93 additions and 1879 deletions

View file

@ -790,7 +790,7 @@ proc writeOutputJson*(d: PDoc, filename, outExt: string,
discard "fixme: error report"
proc commandDoc*() =
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache())
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache(), newConfigRef())
if ast == nil: return
var d = newDocumentor(gProjectFull, options.gConfigVars)
d.hasToc = true
@ -840,7 +840,7 @@ proc commandRst2TeX*() =
commandRstAux(gProjectFull, TexExt)
proc commandJson*() =
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache())
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache(), newConfigRef())
if ast == nil: return
var d = newDocumentor(gProjectFull, options.gConfigVars)
d.hasToc = true
@ -855,7 +855,7 @@ proc commandJson*() =
writeRope(content, getOutFile(gProjectFull, JsonExt), useWarning = false)
proc commandTags*() =
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache())
var ast = parseFile(gProjectMainIdx.FileIndex, newIdentCache(), newConfigRef())
if ast == nil: return
var d = newDocumentor(gProjectFull, options.gConfigVars)
d.hasToc = true