Types
InstantiationInfo = typeof(instantiationInfo())
- Source Edit
MsgFlag = enum msgStdout, ## force writing to stdout, even stderr is default msgSkipHook, ## skip message hook even if it is present msgNoUnitSep ## the message is a complete "paragraph".
- flags altering msgWriteln behavior Source Edit
TErrorHandling = enum doNothing, doAbort, doRaise
- Source Edit
Consts
commandLineDesc = "command line"
- Source Edit
gCmdLineInfo = (line: 1'u, col: 1, fileIndex: -3)
- Source Edit
Procs
proc exactEquals(a, b: TLineInfo): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc fileInfoIdx(conf: ConfigRef; filename: AbsoluteFile): FileIndex {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc fileInfoIdx(conf: ConfigRef; filename: AbsoluteFile; isKnownFile: var bool): FileIndex {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc fileInfoIdx(conf: ConfigRef; filename: RelativeFile): FileIndex {. ...raises: [KeyError, Exception, OSError], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc fileInfoIdx(conf: ConfigRef; filename: RelativeFile; isKnownFile: var bool): FileIndex {. ...raises: [KeyError, Exception, OSError], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc fileInfoKnown(conf: ConfigRef; filename: AbsoluteFile): bool {....raises: [], tags: [ReadDirEffect], forbids: [].}
- Source Edit
proc genSuccessX(conf: ConfigRef) {....raises: [ValueError, OSError, Exception, KeyError, IOError, ERecoverableError], tags: [TimeEffect, RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect], forbids: [].}
- Source Edit
proc getInfoContext(conf: ConfigRef; index: int): TLineInfo {....raises: [], tags: [], forbids: [].}
- Source Edit
proc getInfoContextLen(conf: ConfigRef): int {....raises: [], tags: [], forbids: [].}
- Source Edit
proc liMessage(conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string; eh: TErrorHandling; info2: InstantiationInfo; isRaw = false; ignoreError = false) {....gcsafe, noinline, ...raises: [Exception, ValueError, KeyError, OSError, IOError, ERecoverableError], tags: [ RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect], forbids: [].}
- Source Edit
proc listWarnings(conf: ConfigRef) {....raises: [Exception, IOError, ValueError], tags: [RootEffect, WriteIOEffect], forbids: [].}
- Source Edit
proc makeCString(s: string): Rope {....raises: [], tags: [], forbids: [].}
- Source Edit
proc msgKindToString(kind: TMsgKind): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc msgWriteln(conf: ConfigRef; s: string; flags: MsgFlags = {}) {. ...raises: [Exception, IOError], tags: [RootEffect, WriteIOEffect], forbids: [].}
- Writes given message string to stderr by default. If --stdout option is given, writes to stdout instead. If message hook is present, then it is used to output message rather than stderr/stdout. This behavior can be altered by given optional flags. Source Edit
proc newLineInfo(conf: ConfigRef; filename: AbsoluteFile; line, col: int): TLineInfo {. inline, ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc newLineInfo(fileInfoIdx: FileIndex; line, col: int): TLineInfo {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc popInfoContext(conf: ConfigRef) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc pushInfoContext(conf: ConfigRef; info: TLineInfo; detail: string = "") {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc setDirtyFile(conf: ConfigRef; fileIdx: FileIndex; filename: AbsoluteFile) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc setInfoContextLen(conf: ConfigRef; L: int) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc sourceLine(conf: ConfigRef; i: TLineInfo): string {....raises: [], tags: [ReadIOEffect], forbids: [].}
- 1-based index (matches editor line numbers); 1st line is for i.line = 1 last valid line is numLines inclusive Source Edit
proc suggestQuit() {....raises: [ESuggestDone], tags: [], forbids: [].}
- Source Edit
proc suggestWriteln(conf: ConfigRef; s: string) {....raises: [IOError, Exception], tags: [WriteIOEffect, RootEffect], forbids: [].}
- Source Edit
proc toFileLineCol(conf: ConfigRef; info: TLineInfo): string {.inline, ...raises: [Exception, KeyError, OSError], tags: [RootEffect, ReadDirEffect], forbids: [].}
- Source Edit
proc toFilenameOption(conf: ConfigRef; fileIdx: FileIndex; opt: FilenameOption): string {. ...raises: [Exception, KeyError, OSError], tags: [RootEffect, ReadDirEffect], forbids: [].}
- Source Edit
proc toFullPath(conf: ConfigRef; fileIdx: FileIndex): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc toFullPathConsiderDirty(conf: ConfigRef; fileIdx: FileIndex): AbsoluteFile {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc toLinenumber(info: TLineInfo): int {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc toMsgFilename(conf: ConfigRef; fileIdx: FileIndex): string {. ...raises: [Exception, KeyError, OSError], tags: [RootEffect, ReadDirEffect], forbids: [].}
- Source Edit
proc toProjPath(conf: ConfigRef; fileIdx: FileIndex): string {....raises: [], tags: [], forbids: [].}
- Source Edit
proc uniqueModuleName(conf: ConfigRef; fid: FileIndex): string {. ...raises: [Exception], tags: [RootEffect], forbids: [].}
- The unique module name is guaranteed to only contain {'A'..'Z', 'a'..'z', '0'..'9', '_'} so that it is useful as a C identifier snippet. Source Edit
proc warningDeprecated(conf: ConfigRef; info: TLineInfo = gCmdLineInfo; msg = "") {. inline, ...raises: [Exception, ValueError, KeyError, OSError, IOError, ERecoverableError], tags: [RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect], forbids: [].}
- Source Edit
Templates
template globalAssert(conf: ConfigRef; cond: untyped; info: TLineInfo = unknownLineInfo; arg = "")
- avoids boilerplate Source Edit
template globalError(conf: ConfigRef; info: TLineInfo; arg: string)
- Source Edit
template instLoc(): InstantiationInfo
- Source Edit
template internalAssert(conf: ConfigRef; e: bool)
- Source Edit
template internalError(conf: ConfigRef; errMsg: string)
- Source Edit
template internalError(conf: ConfigRef; info: TLineInfo; errMsg: string)
- Source Edit
template lintReport(conf: ConfigRef; info: TLineInfo; beau, got: string; extraMsg = "")
- Source Edit
template localError(conf: ConfigRef; info: TLineInfo; arg: string)
- Source Edit
template rawMessage(conf: ConfigRef; msg: TMsgKind; arg: string)
- Source Edit
template rawMessage(conf: ConfigRef; msg: TMsgKind; args: openArray[string])
- Source Edit
template toFilename(conf: ConfigRef; fileIdx: FileIndex): string
- Source Edit
template toFilename(conf: ConfigRef; info: TLineInfo): string
- Source Edit
template toFullPath(conf: ConfigRef; info: TLineInfo): string
- Source Edit
template toFullPathConsiderDirty(conf: ConfigRef; info: TLineInfo): string
- Source Edit
template toMsgFilename(conf: ConfigRef; info: TLineInfo): string
- Source Edit
template toProjPath(conf: ConfigRef; info: TLineInfo): string
- Source Edit