Remove expr/stmt (#5857)

This commit is contained in:
Arne Döring 2017-07-25 09:28:23 +02:00 • committed by Andreas Rumpf
commit 000b8afd26
168 changed files with 497 additions and 529 deletions

View file

@ -10,7 +10,7 @@ import macros
proc blah(x: proc (a, b: int): int) =
echo x(5, 5)
macro test(): stmt =
macro test(): untyped =
result = newNimNode(nnkEmpty)
blah(test())

View file

@ -1,6 +1,6 @@
# bug #1988
template t(e: expr) = discard
template t(e) = discard
proc positive(x: int): int = +x
proc negative(x: int): int = -x

View file

@ -8,7 +8,7 @@ true'''
import macros
macro thirteen(args: varargs[expr]): expr =
macro thirteen(args: varargs[untyped]): int =
result = newIntLitNode(13)
doAssert(13==thirteen([1,2])) # works
@ -22,7 +22,8 @@ echo "success"
# bug #2545
import macros
macro test(e: varargs[untyped]): expr = bindSym"true"
macro test(e: varargs[untyped]): untyped =
bindSym"true"
echo test(a)
echo test(fake=90, arguments=80, also="false", possible=true)