Scratchpad for the macro expander, which is used to store all intermediate data except the details about the runtime.
Is added by the macro engine to originals and results of macro expansions.
After being synthesized by the parser, primary constructors aren't fully baked yet.
Carries information necessary to expand the host tree.
Carries information necessary to expand the host tree. At times we need to store this info, because macro expansion can be delayed until its targs are inferred. After a macro application has been successfully expanded, this attachment is destroyed.
When present, suppresses macro expansion for the host.
Determines whether the target is either an original or a result of a macro expansion.
Determines whether the target is either an original or a result of a macro expansion.
The parameter is of type Any
, because macros can expand both into trees and into annotations.
Determines whether the given tree has an associated SuperArgsAttachment.
Determines whether a tree should not be expanded, because someone has put SuppressMacroExpansionAttachment on it or one of its children.
Determines whether a tree should or should not be adapted, because someone has put MacroImplRefAttachment on it.
After macro expansion is completed, links the expandee and the expansion result
by annotating them both with a MacroExpansionAttachment
.
After macro expansion is completed, links the expandee and the expansion result by annotating them both with a MacroExpansionAttachment
.
After macro expansion is completed, links the expandee and the expansion result by annotating them both with a MacroExpansionAttachment
.
The expanded
parameter is of type Any
, because macros can expand both into trees and into annotations.
Loads underlying MacroExpanderAttachment from a macro expandee or returns a default value for that attachment.
Marks the tree as a macro impl reference, which is a naked reference to a method.
Marks the tree as a macro impl reference, which is a naked reference to a method.
This is necessary for typechecking macro impl references (see DefaultMacroCompiler.defaultResolveMacroImpl
),
because otherwise typing a naked reference will result in the "follow this method with _' if you want to
treat it as a partially applied function" errors.
This mark suppresses adapt except for when the annottee is a macro application.
Convenience method for SuperArgsAttachment
.
Convenience method for SuperArgsAttachment
.
Compared with MacroRuntimeAttachment
this attachment has different a usage pattern,
so it really benefits from a dedicated extractor.
Suppresses macro expansion of the tree by putting SuppressMacroExpansionAttachment on it.
Unmarks the tree as a macro impl reference (see markMacroImplRef
for more information).
Unmarks the tree as a macro impl reference (see markMacroImplRef
for more information).
This is necessary when a tree that was previously deemed to be a macro impl reference, typechecks to be a macro application. Then we need to unmark it, expand it and try to treat its expansion as a macro impl reference.
Unsuppresses macro expansion of the tree by removing SuppressMacroExpansionAttachment from it and its children.