MacroTools.jl
MacroTools.jl copied to clipboard
Match types when slurping
I couldn't work out how to match types when slurping with __
:
block = quote
begin
north
east
south
west
end
end
Untyped slurping works:
symbols = @match block begin
begin
s__
end => s
end
but I wanted to match only Symbols
, so I tried this but didn't work:
symbols = @match block begin
begin
s__Symbol
end => s
end