Add back declarative macro definition forms
Version 1.0 only comes with primitive syntax transformer forms which is obviously not great for everyday use. Some initial syntax thoughts for a more declarative form:
// pattern matching
syntax new = function (ctx) {
return match (ctx) {
case`new $ident $params` => #`$ident.create $params`
}
}
syntax let = function (ctx) {
return match (ctx) {
case`let $ident = $init:expr $rest ...` => #`
(function ($ident) {
$rest ...
})($init)
`
}
}
This should happen after #378 and import ... for macros
lands so the matching can just be a library.