added another macro regression

This commit is contained in:
Araq
2012-06-20 00:45:57 +02:00
parent 39137294a3
commit 40339aac62
2 changed files with 10 additions and 1 deletions

View File

@@ -1081,7 +1081,7 @@ proc SemStmt(c: PContext, n: PNode): PNode =
# transformed into regular try blocks:
#
# var f = fopen("somefile") | var f = fopen("somefile")
# finally: fcsole(f) | try:
# finally: fclose(f) | try:
# ... | ...
# | finally:
# | fclose(f)

View File

@@ -19,3 +19,12 @@ macro test*(a: stmt): stmt =
test:
"hi"
macro dump(n: stmt): stmt =
dump(n)
if kind(n) == nnkNone:
nil
else:
hint($kind(n))
for i in countUp(0, len(n)-1):
nil