Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue