txt: ## macro.md
  class Macro
  
  Compile-time routine
  
  ```raku
  class Macro is Routine { }
  ```
  
  A macro is a Routine whose invocation typically happens during parsing. By returning an [`AST`](/type/AST), a macro can inject code into the calling location.
  
  # [Typegraph](# "go to top of document")[§](#typegraphrelations "direct link")
  
  Type relations for `Macro`
  
  
  
  raku-type-graph
  
  
  
  Macro
  Macro
  
  
  Routine
  Routine
  
  
  Macro->Routine
  
  
  
  Mu
  Mu
  
  
  Any
  Any
  
  
  Any->Mu
  
  
  
  Callable
  Callable
  
  
  Code
  Code
  
  
  Code->Any
  
  
  
  Code->Callable
  
  
  
  Block
  Block
  
  
  Block->Code
  
  
  
  Routine->Block
  
  [Expand chart above](/assets/typegraphs/Macro.svg)
  