[Prev][Next][Index][Thread]
definer macros
Can anyone tell me why I get "Invalid syntax in responder-definer
macro call" when I try to use the following macro? I can work around
the problem by changing the syntax to something like "define responder
foo (uri, request, stream) ... end" but that's not what I want.
Thanks.
define macro responder-definer
{ define responder ?:name = ?uri:expression
(?request:name, ?stream:name)
?:body
end }
=>
{ define method ?name (?request, ?stream) ?body end;
register-response-function(?uri, ?name) }
end;
define responder test = "/test" (request, stream)
format(stream, "<html><body>test</body></html>");
end;
Follow-Ups: