hintMsgOrigin now works in VM code (#14678)

* `hintMsgOrigin` now works in VM code

* remove a simplification for now
This commit is contained in:
Timothee Cour 2020-06-15 23:49:57 -07:00 • committed by GitHub
commit de5cde473a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 13 deletions

View file

@ -13,7 +13,7 @@ import
import std/private/miscdollars
import strutils2
type InstantiationInfo = typeof(instantiationInfo())
type InstantiationInfo* = typeof(instantiationInfo())
template instLoc(): InstantiationInfo = instantiationInfo(-2, fullPaths = true)
template flushDot(conf, stdorr) =
@ -385,7 +385,7 @@ proc getMessageStr(msg: TMsgKind, arg: string): string =
result = msgKindToString(msg) % [arg]
type
TErrorHandling = enum doNothing, doAbort, doRaise
TErrorHandling* = enum doNothing, doAbort, doRaise
proc log*(s: string) =
var f: File
@ -485,7 +485,7 @@ proc formatMsg*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string): s
else: ErrorTitle
conf.toFileLineCol(info) & " " & title & getMessageStr(msg, arg)
proc liMessage(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
proc liMessage*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string,
eh: TErrorHandling, info2: InstantiationInfo, isRaw = false) {.noinline.} =
var
title: string