Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:tene/steme
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 28, 2009
2 parents 4e981ea + f0c9359 commit 6693bf4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions t/05-macro.t
@@ -0,0 +1,14 @@
(say "1..2")
(define num 1)
(let ((ok (lambda (cond msg) (say (if cond 'ok ' 'nok ') num ' # ' msg)(define num (+ num 1)))))
(macro is
"<sym> <a=.item> <b=.item>"
"make PAST::Op.new(:pasttype('call'), :name('ok'),
PAST::Op.new(:pasttype('call'), :name('='),
$<a>.ast, $<b>.ast),
PAST::Val.new( :returns('String'), :value('Got ' ~ $<b> ~ ' from ' ~ $<a> ))
);"
)
(is 1 1)
(is (+ 1 1) 2)
)

0 comments on commit 6693bf4

Please sign in to comment.