The *(term) for a way to extend the _(syntax) and _(semantics) of a _(programming language); they are a special case of compile-time *(rewrite).

Macros operate at the level of a structure in which the language is modeled, which can be at various levels: theoretical monads, abstract syntax trees, lexer tokens, or character strings. The higher-level methods of doing this generally offer cleaner methods of expressing these transformations, and are preferred when accessible.

They are a particular case of _(metaprogramming), done within a language itself, as a restricted form of _(compile-time reflection). The integration of macros with general compile-time reflection requires the availability of suitable ways to control code emission, that are not usually available in standard macro systems; in general these subjects are considered separate, except when _(open implementation)s are explicitly brought up.