diff options
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index e50ed0f2a..b89b4ee93 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -739,6 +739,8 @@ proc `??`* (info: TLineInfo, filename: string): bool = const trackPosInvalidFileIdx* = -2 # special marker so that no suggestions # are produced within comments and string literals var gTrackPos*: TLineInfo +var gTrackPosAttached*: bool ## whether the tracking position was attached to some + ## close token. type MsgFlag* = enum ## flags altering msgWriteln behavior @@ -863,6 +865,9 @@ proc handleError(msg: TMsgKind, eh: TErrorHandling, s: string) = proc `==`*(a, b: TLineInfo): bool = result = a.line == b.line and a.fileIndex == b.fileIndex +proc exactEquals*(a, b: TLineInfo): bool = + result = a.fileIndex == b.fileIndex and a.line == b.line and a.col == b.col + proc writeContext(lastinfo: TLineInfo) = var info = lastinfo for i in countup(0, len(msgContext) - 1): |