[honu] add two more tests

This commit is contained in:
Jon Rafkind 2012-03-20 11:31:50 -06:00
parent 918c87e96b
commit a606f6614b
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#lang honu
macro add_all(){
number:expression ...
} {
syntax(
$ number + $ ... 0
)
/*
syntax(
$ printf("~a\n", number) $ ...
)
*/
}
add_all 1 2 3 * 4;

View File

@ -0,0 +1,14 @@
#lang honu
var where = 0
macro varwhere(where =){ unparsed where bind:identifier = any:expression }
{ syntax({var bind = any
unparsed}) }
varwhere { printf("x is ~a\n", x)
{
var x = 5;
x * 2
}
} where x = 2 + 1