You can now match against more grammar productions with the MacroContext::expand
method:
syntax m = ctx => {
let expr = ctx.expand('BinaryExpression');
// ...
}
syntax n = ctx => {
let ident = ctx.expand('IdentifierExpression');
// ...
}
m foo() + 100 - [1, 2, 3] // <- everything is matched
n foo() + 100 - [1, 2, 3] // <- only `foo` is matched