From c416346d38583e01224a94e919341937acaf45f6 Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 30 Jun 2016 18:41:07 +0200 Subject: [PATCH] deprecated macros.emit --- lib/core/macros.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 85ebdbfd0..8577296f0 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -884,7 +884,7 @@ proc boolVal*(n: NimNode): bool {.compileTime, noSideEffect.} = else: n == bindSym"true" # hacky solution for now when not defined(booting): - template emit*(e: static[string]): stmt = + template emit*(e: static[string]): stmt {.deprecated.} = ## accepts a single string argument and treats it as nim code ## that should be inserted verbatim in the program ## Example: @@ -892,6 +892,7 @@ when not defined(booting): ## .. code-block:: nim ## emit("echo " & '"' & "hello world".toUpper & '"') ## + ## Deprecated since version 0.15 since it's so rarely useful. macro payload: stmt {.gensym.} = result = parseStmt(e) payload()