FluxML / MacroTools.jl

MacroTools provides a library of tools for working with Julia code and expressions.
https://fluxml.ai/MacroTools.jl/stable/
Other
311 stars 79 forks source link

Cannot capture for loop expressions #151

Closed darsnack closed 4 years ago

darsnack commented 4 years ago

Currently, it seems like the following does not work:

@capture(ex, for itr_ body_ end)

Is there a blocking reason for this? Would it be straightforward to add support?

cstjean commented 4 years ago

Shouldn't it be for var_ in itr_; body__ end?

darsnack commented 4 years ago

Yeah that works.