fixes documentation generator
This commit is contained in:
parent
05f09fafcf
commit
d330a72a45
4 changed files with 11 additions and 6 deletions
|
|
@ -442,7 +442,7 @@ type
|
||||||
TNoteKinds* = set[TNoteKind]
|
TNoteKinds* = set[TNoteKind]
|
||||||
|
|
||||||
TFileInfo*{.final.} = object
|
TFileInfo*{.final.} = object
|
||||||
fullPath*: string # This is a canonical full filesystem path
|
fullPath: string # This is a canonical full filesystem path
|
||||||
projPath*: string # This is relative to the project's root
|
projPath*: string # This is relative to the project's root
|
||||||
shortName*: string # short name of the module
|
shortName*: string # short name of the module
|
||||||
quotedName*: PRope # cached quoted short name for codegen
|
quotedName*: PRope # cached quoted short name for codegen
|
||||||
|
|
|
||||||
|
|
@ -188,8 +188,9 @@ proc getPrefixDir*(): string =
|
||||||
result = splitPath(getAppDir()).head
|
result = splitPath(getAppDir()).head
|
||||||
|
|
||||||
proc canonicalizePath*(path: string): string =
|
proc canonicalizePath*(path: string): string =
|
||||||
result = path.expandFilename
|
#result = path.expandFilename
|
||||||
when not FileSystemCaseSensitive: result = result.toLower
|
when not FileSystemCaseSensitive: result = path.toLower
|
||||||
|
else: result = path
|
||||||
|
|
||||||
proc shortenDir*(dir: string): string =
|
proc shortenDir*(dir: string): string =
|
||||||
## returns the interesting part of a dir
|
## returns the interesting part of a dir
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ template styleCheckDef*(info: TLineInfo; s: PSym) =
|
||||||
template styleCheckDef*(s: PSym) =
|
template styleCheckDef*(s: PSym) =
|
||||||
styleCheckDef(s.info, s, s.kind)
|
styleCheckDef(s.info, s, s.kind)
|
||||||
|
|
||||||
proc styleCheckUse*(info: TLineInfo; s: PSym) =
|
proc styleCheckUseImpl(info: TLineInfo; s: PSym) =
|
||||||
if info.fileIndex < 0: return
|
if info.fileIndex < 0: return
|
||||||
# we simply convert it to what it looks like in the definition
|
# we simply convert it to what it looks like in the definition
|
||||||
# for consistency
|
# for consistency
|
||||||
|
|
@ -138,3 +138,7 @@ proc styleCheckUse*(info: TLineInfo; s: PSym) =
|
||||||
system.shallowCopy(gSourceFiles[info.fileIndex].lines[info.line-1], x)
|
system.shallowCopy(gSourceFiles[info.fileIndex].lines[info.line-1], x)
|
||||||
gSourceFiles[info.fileIndex].dirty = true
|
gSourceFiles[info.fileIndex].dirty = true
|
||||||
#if newName == "File": writeStackTrace()
|
#if newName == "File": writeStackTrace()
|
||||||
|
|
||||||
|
template styleCheckUse*(info: TLineInfo; s: PSym) =
|
||||||
|
when defined(nimfix):
|
||||||
|
if gStyleCheck != StyleCheck.None: styleCheckUseImpl(info, s)
|
||||||
|
|
|
||||||
|
|
@ -1135,14 +1135,14 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||||
of opcParseExprToAst:
|
of opcParseExprToAst:
|
||||||
decodeB(rkNode)
|
decodeB(rkNode)
|
||||||
# c.debug[pc].line.int - countLines(regs[rb].strVal) ?
|
# c.debug[pc].line.int - countLines(regs[rb].strVal) ?
|
||||||
let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFilename,
|
let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFullPath,
|
||||||
c.debug[pc].line.int)
|
c.debug[pc].line.int)
|
||||||
if sonsLen(ast) != 1:
|
if sonsLen(ast) != 1:
|
||||||
globalError(c.debug[pc], errExprExpected, "multiple statements")
|
globalError(c.debug[pc], errExprExpected, "multiple statements")
|
||||||
regs[ra].node = ast.sons[0]
|
regs[ra].node = ast.sons[0]
|
||||||
of opcParseStmtToAst:
|
of opcParseStmtToAst:
|
||||||
decodeB(rkNode)
|
decodeB(rkNode)
|
||||||
let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFilename,
|
let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFullPath,
|
||||||
c.debug[pc].line.int)
|
c.debug[pc].line.int)
|
||||||
regs[ra].node = ast
|
regs[ra].node = ast
|
||||||
of opcCallSite:
|
of opcCallSite:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue