ApplyDirective applies a directive to a named pass and all of its dependents.
(pass Method, t TransformPass)
| 153 | // ApplyDirective applies a directive to a named pass |
| 154 | // and all of its dependents. |
| 155 | func (p *Printer) ApplyDirective(pass Method, t TransformPass) { |
| 156 | for _, g := range p.gens { |
| 157 | if g.Method().isset(pass) { |
| 158 | g.Add(t) |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | // Print prints an Elem. |
| 164 | func (p *Printer) Print(e Elem) error { |
no test coverage detected