Skip to content

Commit

Permalink
add nested macro example, fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
vendethiel committed Jul 14, 2017
1 parent b1a8bbf commit ad4b8d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/03-eval.t
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,14 @@ is_deeply run("
"), {type => 'num', value => 3},
"macros respect both scopes at the same time";

is_deeply run("
(let outer
(macro ()
(list 'macro (list) (list '+ 3 4)))
((outer)))
"), {type => 'num', value => 7},
"macros can be returned from macros";

like(exception { run('()'); }, qr/invalid call/,
"Empty calls are invalid");

Expand Down

0 comments on commit ad4b8d5

Please sign in to comment.