From dfee2bf66e80c950b7aa2be62dc0deab74aa56e7 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 30 Jul 2016 16:31:44 +0200 Subject: compiler free of old expr/stmt metatypes --- compiler/msgs.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'compiler') 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) = -- cgit 1.4.1-2-gfad0