diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-30 16:31:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-30 16:34:42 +0200 |
commit | dfee2bf66e80c950b7aa2be62dc0deab74aa56e7 (patch) | |
tree | 23f53a5b435d4d6f79e22b7133d8152c86bc841e /compiler | |
parent | 39ebe2175bd4e8e62d03875d06b24feafd36f8f7 (diff) | |
download | Nim-dfee2bf66e80c950b7aa2be62dc0deab74aa56e7.tar.gz |
compiler free of old expr/stmt metatypes
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/msgs.nim | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index 83914753f..4a9980066 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -760,7 +760,7 @@ proc msgWriteln*(s: string, flags: MsgFlags = {}) = flushFile(stderr) macro callIgnoringStyle(theProc: typed, first: typed, - args: varargs[expr]): stmt = + args: varargs[typed]): untyped = let typForegroundColor = bindSym"ForegroundColor".getType let typBackgroundColor = bindSym"BackgroundColor".getType let typStyle = bindSym"Style".getType @@ -777,7 +777,7 @@ macro callIgnoringStyle(theProc: typed, first: typed, typ != typTerminalCmd: result.add(arg) -macro callStyledWriteLineStderr(args: varargs[expr]): stmt = +macro callStyledWriteLineStderr(args: varargs[typed]): untyped = result = newCall(bindSym"styledWriteLine") result.add(bindSym"stderr") for arg in children(args[0][1]): @@ -789,7 +789,7 @@ template callWritelnHook(args: varargs[string, `$`]) = s.add arg writelnHook s -template styledMsgWriteln*(args: varargs[expr]) = +template styledMsgWriteln*(args: varargs[typed]) = if not isNil(writelnHook): callIgnoringStyle(callWritelnHook, nil, args) elif optStdout in gGlobalOptions: @@ -1000,11 +1000,11 @@ proc internalError*(errMsg: string) = writeContext(unknownLineInfo()) rawMessage(errInternal, errMsg) -template assertNotNil*(e: expr): expr = +template assertNotNil*(e): untyped = if e == nil: internalError($instantiationInfo()) e -template internalAssert*(e: bool): stmt = +template internalAssert*(e: bool) = if not e: internalError($instantiationInfo()) proc addSourceLine*(fileIdx: int32, line: string) = |