added another macro regression
This commit is contained in:
parent
39137294a3
commit
40339aac62
2 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue