A slice of the Scala macros context that defines shorthands for the most frequently used types and functions of the underlying compiler universe.
Attachments provide a way to associate custom metadata with symbols and trees.
The Scala macros context.
A slice of the Scala macros context that exposes enclosing trees (method, class, compilation unit and currently compiled application), the enclosing position of the macro expansion, as well as macros and implicits that are currently in-flight.
A slice of the Scala macros context that provides a facility to evaluate trees.
A slice of the Scala macros context that defines shorthands for the
most common Expr
-creating functions.
A slice of the Scala macros context that provides facilities to communicate with the compiler's front end (emit warnings, errors and other sorts of messages).
A slice of the Scala macros context that provides facilities to communicate with the compiler's infrastructure.
A slice of the Scala macros context that provides functions that generate unique names.
Indicates an error during scala.reflect.macros.Parsers#parse.
A slice of the Scala macros context that exposes functions to parse strings with Scala code into trees.
Indicates an expected error during one of the reifyXXX
methods in scala.reflect.macros.Reifiers.
A slice of the Scala macros context that exposes functions to save reflection artifacts for runtime.
A helper available in scala.reflect.macros.Universe that defines shorthands for the most common tree-creating functions.
Indicates an error during one of the methods in scala.reflect.macros.Typers.
A slice of the Scala macros context that partially exposes the type checker to macro writers.
Indicates an unexpected expected error during one of the reifyXXX
methods in scala.reflect.macros.Reifiers.
The refinement of scala.reflect.api.Universe for the use by macro writers.
The base package for Scala macros.
Macros are functions that are called by the compiler during compilation. Within these functions the programmer has access to compiler APIs exposed in scala.reflect.macros.Context. For example, it is possible to generate, analyze and typecheck code.
See the Macros Guide on how to get started with Scala macros.