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
commit 5cd152bfda
4 changed files with 40 additions and 12 deletions

View file

@ -1192,10 +1192,10 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
else: internalAssert c.config, false
of mNHint:
unused(c, n, dest)
genUnaryStmt(c, n, opcNHint)
genBinaryStmt(c, n, opcNHint)
of mNWarning:
unused(c, n, dest)
genUnaryStmt(c, n, opcNWarning)
genBinaryStmt(c, n, opcNWarning)
of mNError:
if n.len <= 1:
# query error condition: