On Mon, Jul 27, 2015 at 7:03 PM, Yichao Yu <[email protected]> wrote: > On Mon, Jul 27, 2015 at 7:00 PM, Christoph Ortner > <[email protected]> wrote: >> This is wonderful - thanks! >> >> But no chance to get it to work in 0.3? > > You could probably backport my PR to the base julia @doc to Docile on 0.3. > (Plain string as doc is a parsing change in 0.4 and that cannot be > backported)
Another trick when writing this kind of macros is that you don't have to generate all the code in the macro. If different macro expansion shares some code, you can just define a function and emit a call to that function in the macro expansion. For example, instead of calling `error` directly and struggling with expression splatting, you can just forward all the parameters to a `throw_no_match(args...)` and do the hard work there. > >> >> Thanks, Christoph >>
