racket/collects/tests/honu/where.honu

18 lines
373 B
Plaintext

#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
varwhere { macro foo(){ z:expression }{ syntax(x + z) }
foo 5 } where x = 2 * 8