PipelineHooks

constructor(afterRegisteringLibraries: Pipeline.(Set<Library>) -> Unit = {}, afterLexing: Pipeline.(Sequence<Token>) -> Unit = {}, afterParsing: Pipeline.(AstRoot) -> Unit = {}, afterExpanding: Pipeline.(AstRoot) -> Unit = {}, afterTreeRewrite: Pipeline.(AstRoot) -> Unit = {}, afterTreeTraversal: Pipeline.(AstRoot) -> Unit = {}, afterRendering: Pipeline.(CharSequence) -> Unit = {}, afterPostRendering: Pipeline.(CharSequence) -> Unit = {}, afterAllRendering: Pipeline.(CharSequence) -> Unit = {}, afterGeneratingResources: Pipeline.(Set<OutputResource>) -> Unit = {})

Parameters

afterRegisteringLibraries

action to run after the libraries have been registered and are ready to be looked up (libraries as arguments)

afterLexing

action to run after the tokens have been produced (output tokens as arguments)

afterParsing

action to run after the AST has been generated (root as an argument)

afterExpanding

action to run after the source-level function call queue has been expanded (root as an argument). Further expansion may still happen during afterTreeRewrite if any .extend was registered: use that hook when the consumer needs to observe the fully rewritten tree

afterTreeRewrite

action to run after the AST rewrite has been completed (root as an argument)

afterTreeTraversal

action to run after the produced AST has been visited

afterRendering

action to run after the rendered output code has been generated (output code as an argument)

afterPostRendering

action to run after the rendered output code has been manipulated (e.g. wrapped) (output code as an argument)

afterAllRendering

action to run after all rendering has been completed. It usually matches with afterPostRendering. If post-rendering is disabled, it will match with afterRendering instead.