RegisterPlugin adds a plugin to the pipeline
(plugin Plugin)
| 41 | |
| 42 | // RegisterPlugin adds a plugin to the pipeline |
| 43 | func (p *Pipeline) RegisterPlugin(plugin Plugin) { |
| 44 | p.plugins = append(p.plugins, plugin) |
| 45 | |
| 46 | // Set context if plugin is ContextAware |
| 47 | if ca, ok := plugin.(ContextAware); ok { |
| 48 | ca.SetContext(p.Ctx) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | // Transform transforms an AST using the 3-phase pipeline |
| 53 | // Phase 1: Discovery - Process() to discover types |
no test coverage detected