diff options
author | Araq <rumpf_a@web.de> | 2014-09-14 11:34:06 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-09-14 11:34:06 +0200 |
commit | d330a72a4565353bd3ad54ade0580d53cd9d5a5d (patch) | |
tree | 4cff9e57a1595c8893bd08d70845e9dde2dd7929 | |
parent | 05f09fafcffb8578b03fb719e7f8f0cdbae7ed99 (diff) | |
download | Nim-d330a72a4565353bd3ad54ade0580d53cd9d5a5d.tar.gz |
fixes documentation generator
-rw-r--r-- | compiler/msgs.nim | 2 | ||||
-rw-r--r-- | compiler/options.nim | 5 | ||||
-rw-r--r-- | compiler/pretty.nim | 6 | ||||
-rw-r--r-- | compiler/vm.nim | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 622c64359..da2fe122d 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -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 diff --git a/compiler/options.nim b/compiler/options.nim index 69067b7c4..9d7df2f2b 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -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 diff --git a/compiler/pretty.nim b/compiler/pretty.nim index 9f2074a0b..ec9322309 100644 --- a/compiler/pretty.nim +++ b/compiler/pretty.nim @@ -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) diff --git a/compiler/vm.nim b/compiler/vm.nim index 5ef4576ec..f74f2e0d7 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -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: |