Allow hint and warning to specify its loc info (#8771)

Let's bring those to feature-parity with `error`.
This commit is contained in:
LemonBoy
2018-08-28 22:59:28 +02:00
committed by Andreas Rumpf
parent 6e83746caa
commit 5cd152bfda
4 changed files with 40 additions and 12 deletions

View File

@@ -336,10 +336,10 @@ proc copyNimTree*(n: NimNode): NimNode {.magic: "NCopyNimTree", noSideEffect.}
proc error*(msg: string, n: NimNode = nil) {.magic: "NError", benign.}
## writes an error message at compile time
proc warning*(msg: string) {.magic: "NWarning", benign.}
proc warning*(msg: string, n: NimNode = nil) {.magic: "NWarning", benign.}
## writes a warning message at compile time
proc hint*(msg: string) {.magic: "NHint", benign.}
proc hint*(msg: string, n: NimNode = nil) {.magic: "NHint", benign.}
## writes a hint message at compile time
proc newStrLitNode*(s: string): NimNode {.compileTime, noSideEffect.} =