The Crystal Programming Language Forum

Output of a macro

I am starting to write some macros but was wondering

Can I inspect the generated code of a macro ?

https://crystal-lang.org/api/master/Crystal/Macros.html#debug(format=true):Nop-instance-method

macro some_macro
  # Do whatever
  
  {{debug}}
end

some_macro
1 Like