mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-19 11:07:14 +00:00
fixes documentation generator
This commit is contained in:
@@ -442,7 +442,7 @@ type
|
||||
TNoteKinds* = set[TNoteKind]
|
||||
|
||||
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
|
||||
shortName*: string # short name of the module
|
||||
quotedName*: PRope # cached quoted short name for codegen
|
||||
|
||||
@@ -188,8 +188,9 @@ proc getPrefixDir*(): string =
|
||||
result = splitPath(getAppDir()).head
|
||||
|
||||
proc canonicalizePath*(path: string): string =
|
||||
result = path.expandFilename
|
||||
when not FileSystemCaseSensitive: result = result.toLower
|
||||
#result = path.expandFilename
|
||||
when not FileSystemCaseSensitive: result = path.toLower
|
||||
else: result = path
|
||||
|
||||
proc shortenDir*(dir: string): string =
|
||||
## returns the interesting part of a dir
|
||||
|
||||
@@ -110,7 +110,7 @@ template styleCheckDef*(info: TLineInfo; s: PSym) =
|
||||
template styleCheckDef*(s: PSym) =
|
||||
styleCheckDef(s.info, s, s.kind)
|
||||
|
||||
proc styleCheckUse*(info: TLineInfo; s: PSym) =
|
||||
proc styleCheckUseImpl(info: TLineInfo; s: PSym) =
|
||||
if info.fileIndex < 0: return
|
||||
# we simply convert it to what it looks like in the definition
|
||||
# for consistency
|
||||
@@ -138,3 +138,7 @@ proc styleCheckUse*(info: TLineInfo; s: PSym) =
|
||||
system.shallowCopy(gSourceFiles[info.fileIndex].lines[info.line-1], x)
|
||||
gSourceFiles[info.fileIndex].dirty = true
|
||||
#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:
|
||||
decodeB(rkNode)
|
||||
# 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)
|
||||
if sonsLen(ast) != 1:
|
||||
globalError(c.debug[pc], errExprExpected, "multiple statements")
|
||||
regs[ra].node = ast.sons[0]
|
||||
of opcParseStmtToAst:
|
||||
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)
|
||||
regs[ra].node = ast
|
||||
of opcCallSite:
|
||||
|
||||
Reference in New Issue
Block a user