even more "eg" fixes [ci skip]
This commit is contained in:
parent
725c7caa02
commit
b418c54ec4
3 changed files with 5 additions and 5 deletions
|
|
@ -875,7 +875,7 @@ type
|
||||||
annex*: PLib # additional fields (seldom used, so we use a
|
annex*: PLib # additional fields (seldom used, so we use a
|
||||||
# reference to another object to save space)
|
# reference to another object to save space)
|
||||||
when hasFFI:
|
when hasFFI:
|
||||||
cname*: string # resolved C declaration name in importc decl, eg:
|
cname*: string # resolved C declaration name in importc decl, e.g.:
|
||||||
# proc fun() {.importc: "$1aux".} => cname = funaux
|
# proc fun() {.importc: "$1aux".} => cname = funaux
|
||||||
constraint*: PNode # additional constraints like 'lit|result'; also
|
constraint*: PNode # additional constraints like 'lit|result'; also
|
||||||
# misused for the codegenDecl pragma in the hope
|
# misused for the codegenDecl pragma in the hope
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
#
|
#
|
||||||
|
|
||||||
## Helpers for binaries that use compiler passes, eg: nim, nimsuggest, nimfix
|
## Helpers for binaries that use compiler passes, e.g.: nim, nimsuggest, nimfix
|
||||||
|
|
||||||
import
|
import
|
||||||
options, idents, nimconf, extccomp, commands, msgs,
|
options, idents, nimconf, extccomp, commands, msgs,
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ type
|
||||||
ExampleGroup = ref object
|
ExampleGroup = ref object
|
||||||
## a group of runnableExamples with same rdoccmd
|
## a group of runnableExamples with same rdoccmd
|
||||||
rdoccmd: string ## from 1st arg in `runnableExamples(rdoccmd): body`
|
rdoccmd: string ## from 1st arg in `runnableExamples(rdoccmd): body`
|
||||||
docCmd: string ## from user config, eg --doccmd:-d:foo
|
docCmd: string ## from user config, e.g. --doccmd:-d:foo
|
||||||
code: string ## contains imports; each import contains `body`
|
code: string ## contains imports; each import contains `body`
|
||||||
index: int ## group index
|
index: int ## group index
|
||||||
TDocumentor = object of rstgen.RstGenerator
|
TDocumentor = object of rstgen.RstGenerator
|
||||||
|
|
@ -457,7 +457,7 @@ proc writeExample(d: PDoc; ex: PNode, rdoccmd: string) =
|
||||||
|
|
||||||
proc runAllExamples(d: PDoc) =
|
proc runAllExamples(d: PDoc) =
|
||||||
# This used to be: `let backend = if isDefined(d.conf, "js"): "js"` (etc), however
|
# This used to be: `let backend = if isDefined(d.conf, "js"): "js"` (etc), however
|
||||||
# using `-d:js` (etc) cannot work properly, eg would fail with `importjs`
|
# using `-d:js` (etc) cannot work properly, e.g. would fail with `importjs`
|
||||||
# since semantics are affected by `config.backend`, not by isDefined(d.conf, "js")
|
# since semantics are affected by `config.backend`, not by isDefined(d.conf, "js")
|
||||||
let outputDir = d.exampleOutputDir
|
let outputDir = d.exampleOutputDir
|
||||||
for _, group in d.exampleGroups:
|
for _, group in d.exampleGroups:
|
||||||
|
|
@ -1259,7 +1259,7 @@ proc generateIndex*(d: PDoc) =
|
||||||
writeIndexFile(d[], dest.string)
|
writeIndexFile(d[], dest.string)
|
||||||
|
|
||||||
proc updateOutfile(d: PDoc, outfile: AbsoluteFile) =
|
proc updateOutfile(d: PDoc, outfile: AbsoluteFile) =
|
||||||
if d.module == nil or sfMainModule in d.module.flags: # nil for eg for commandRst2Html
|
if d.module == nil or sfMainModule in d.module.flags: # nil for e.g. for commandRst2Html
|
||||||
if d.conf.outFile.isEmpty:
|
if d.conf.outFile.isEmpty:
|
||||||
d.conf.outFile = outfile.relativeTo(d.conf.outDir)
|
d.conf.outFile = outfile.relativeTo(d.conf.outDir)
|
||||||
if isAbsolute(d.conf.outFile.string):
|
if isAbsolute(d.conf.outFile.string):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue