Open
Description
Hi,
Here is an example, but it would be nice to have a syntax to (ex = :{P,pattern}) to have the matched part of the expression.
@metafunction collectwheres(member1 where *{params1}) begin
member2, params2 = collectwheres(member1)
(member2, (params1..., params2...))
end
@metafunction collectwheres(other) begin
(other,())
end
@metafunction parse_fn(function(*{args},) where w; *{stmts} end) begin
end
for me to use collectwheres method, i need to assign the matched part of the expression by "function(*{args},) where w;" pattern. So is there a way to assign the matched part to a variable so that i can pass it to collectwheres?
Thanks