fixes documentation generator

This commit is contained in:
Araq
2014-09-14 11:34:06 +02:00
parent 05f09fafcf
commit d330a72a45
4 changed files with 11 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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: