further improvements for term rewriting macros

This commit is contained in:
Araq 2012-09-04 00:55:13 +02:00
commit 6753d36854
8 changed files with 74 additions and 28 deletions

View 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"