strange behavior when overriding `function`
Created by: jlongster
I wrote a macro that overrides the function
keyword:
let function = macro {
rule { ($param (,) ...) $body } => {
function ($param (,) ...) $body
}
rule { $id:ident ($param (,) ...) $body } => {
function $id ($param (,) ...) $body
}
}
macro foo {
rule { $x } => {
$x
}
}
The function
macro works fine, but it doesn't work if I define another macro. Evidently macro
expands to something that contains this function definition:
function (stx context) {return syntaxCase (stx , context) {case {_ $x} = > {return syntax {$x}}}}
Why don't the arguments have a comma in between them? It makes it strangely unintuitive to write macros that override function :)