dotty.tools.dottydoc.core.transform
Check what the phase achieves, to be called at any point after it is finished.
Check what the phase achieves, to be called at any point after it is finished.
The sequence position of this phase in the given context where 0 is reserved for NoPhase and the first real phase is at position 1.
The sequence position of this phase in the given context where 0 is reserved for NoPhase and the first real phase is at position 1. -1 if the phase is not installed in the context.
Output should be checkable by TreeChecker
Output should be checkable by TreeChecker
Is this phase the standard typerphase? True for FrontEnd, but not for other first phases (such as FromTasty).
Is this phase the standard typerphase? True for FrontEnd, but not for other first phases (such as FromTasty). The predicate is tested in some places that perform checks and corrections. It's different from isAfterTyper (and cheaper to test).
If set, allow missing or superfluous arguments in applications and type applications.
If set, allow missing or superfluous arguments in applications and type applications.
List of names of phases that should precede this phase
List of names of phases that should precede this phase
Throws an UnsupportedOperationException
with the given method name.
Throws an UnsupportedOperationException
with the given method name.
The idea behind DocMiniTransformations is to fuse transformations to the doc AST, much like
MiniPhaseTransform
in dotty core - but in a much more simple implementationUsage -----
Create a
DocMiniPhase
which overrides the relevant method:On each node in the AST, the appropriate method in
DocMiniPhase
will be called in the order that they are supplied inDocMiniphaseTransformations
.There won't be a match-error as
transformX
is composed with anidentity
function.The transformations in
DocMiniTransformations
will apply transformations to all nodes - this means that you do _not_ need to transform children intransformPackage
, becausetransformX
will be called for the relevant children. If you want to add children toPackage
you need to do that intransformPackage
, these additions will be persisted.