Helpers for binaries that use compiler passes, e.g.: nim, nimsuggest, nimfix
Types
NimProg = ref object suggestMode*: bool supportsStdinFile*: bool processCmdLine*: proc (pass: TCmdLinePass; cmd: openArray[string]; config: ConfigRef)
- Source Edit
Procs
proc initDefinesProg(self: NimProg; conf: ConfigRef; name: string) {....raises: [], tags: [].}
- Source Edit
proc loadConfigs(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; stopOnError = true): bool {.inline, ...raises: [OSError, IOError, Exception, KeyError, EOFError, ValueError, ERecoverableError, CancelConfigProcessing], tags: [ReadIOEffect, ReadDirEffect, ReadEnvEffect, RootEffect, WriteEnvEffect, WriteDirEffect, WriteIOEffect].}
- wrapper around nimconf.loadConfigs to connect to legacy reporting Source Edit
proc loadConfigsAndProcessCmdLine(self: NimProg; cache: IdentCache; conf: ConfigRef; graph: ModuleGraph; argv: openArray[string]): bool {....raises: [ OSError, IOError, Exception, KeyError, EOFError, ValueError, ERecoverableError, CancelConfigProcessing], tags: [ReadIOEffect, ReadDirEffect, ReadEnvEffect, RootEffect, WriteEnvEffect, WriteDirEffect, WriteIOEffect].}
- Load all the necessary configuration files and command-line options. Main entry point for configuration processing. Source Edit
proc loadConfigsAndRunMainCommand(self: NimProg; cache: IdentCache; conf: ConfigRef; graph: ModuleGraph; argv: openArray[string]): bool {....raises: [ OSError, IOError, Exception, KeyError, EOFError, ValueError, ERecoverableError, CancelConfigProcessing], tags: [ReadIOEffect, ReadDirEffect, ReadEnvEffect, RootEffect, WriteEnvEffect, WriteDirEffect, WriteIOEffect].}
- Alias for loadConfigsAndProcessCmdLine, here for backwards compatibility Source Edit
proc prependCurDir(f: AbsoluteFile): AbsoluteFile {....raises: [], tags: [].}
- Source Edit
proc processCmdLineAndProjectPath(self: NimProg; conf: ConfigRef; cmd: openArray[string]) {. ...raises: [Exception, OSError], tags: [RootEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect].}
- Source Edit