mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
added another macro regression
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user