further improvements for term rewriting macros
This commit is contained in:
parent
b4cd119800
commit
6753d36854
8 changed files with 74 additions and 28 deletions
18
tests/patterns/tstmtlist.nim
Normal file
18
tests/patterns/tstmtlist.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
discard """
|
||||
output: '''0
|
||||
|12|34
|
||||
'''
|
||||
"""
|
||||
|
||||
template optWrite{
|
||||
write(stdout, x)
|
||||
write(stdout, y)
|
||||
}(x, y: string) =
|
||||
write(stdout, "|", x, y, "|")
|
||||
|
||||
if true:
|
||||
echo "0"
|
||||
write stdout, "1"
|
||||
write stdout, "2"
|
||||
write stdout, "3"
|
||||
echo "4"
|
||||
Loading…
Add table
Add a link
Reference in a new issue