I would like to know if (and how) one can create macros that would be similar
to suite template from unittest. I.e. with a "head" on the same line that the
name of macro and a body after a colon. What I would like to parse is something
like this:
model "Person":
field Name(string):
max_length = 128
field Age(int):
unsigned validate Age > 20
I tried several signatures for my macro, to no avail. With macro model(name:
string, body: untyped): untyped I get only the string "Person" under body.
Other signatures fail saying Error: type mismatch: got (string, void) `` So can
I do it or do I need to change the semantics here?