Files
linguist/samples/Terra/macrolet.t
2016-01-28 11:22:27 +07:00

17 lines
191 B
Perl

twice = macro(function(a)
return quote
var v = a
in
v + v
end
end)
terra foobar()
var what = 1
return twice([quote what = what + 1 in what end]) + what
end
assert(6 == foobar())