Reputation: 2922
macro m {
rule {
$a: $b
} => {
$a($b)
}
}
m 1: 2
I think sweetjs is interpreting the colon as a marker for match class. If so, how do I escape that make make sweetjs match it as it is?
This seems to work just fine though
macro m {
rule {
:$b
} => {
$b
}
}
m :1
Upvotes: 0
Views: 125