This commit is contained in:
BigEpsilon 2017-08-30 14:44:11 +02:00 • committed by Andreas Rumpf
commit 6f6e6fe4eb
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,13 @@
discard """
output: '''proc foo[T, N: static[int]]()
proc foo[T; N: static[int]]()'''
"""
import macros
macro test():string =
let expr0 = "proc foo[T, N: static[int]]()"
let expr1 = "proc foo[T; N: static[int]]()"
$toStrLit(parseExpr(expr0)) & "\n" & $toStrLit(parseExpr(expr1))
echo test()