Merge pull request #8025 from krux02/remove-immediate

fix #5930
This commit is contained in:
Dominik Picheta 2018-06-13 14:12:16 +01:00 • committed by GitHub
commit 518a3e7f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
import macros import macros
macro case_token(n: untyped): untyped {.immediate.} = macro case_token(n: varargs[untyped]): untyped =
# creates a lexical analyzer from regular expressions # creates a lexical analyzer from regular expressions
# ... (implementation is an exercise for the reader :-) # ... (implementation is an exercise for the reader :-)
nil nil
@ -21,6 +21,6 @@ case_token: inc i
macro foo: typed = macro foo: typed =
var exp = newCall("whatwhat", newIntLitNode(1)) var exp = newCall("whatwhat", newIntLitNode(1))
if compiles(getAst(exp)): return exp if compiles(getAst(exp)): return exp
else: echo "Does not compute!" else: echo "Does not compute! (test OK)"
foo() foo()