summary refs log blame commit diff stats
path: root/tests/tools/tnimscriptwithmacro.nims
blob: 8b97f07696141d22a280a4c82ed6789713b88cb4 (plain) (tree)





















                                                               
discard """
cmd: "nim e $file"
output: '''
foobar
nothing
hallo
"""

# this test ensures that the mode is resetted correctly to repr

import macros

macro foobar(): void =
  result = newCall(bindSym"echo", newLit("nothing"))

echo "foobar"

let x = 123

foobar()

exec "echo hallo"