ExtendEnv auguments the context's environment with the additional options.
(opts ...EnvOption)
| 249 | |
| 250 | // ExtendEnv auguments the context's environment with the additional options. |
| 251 | func (opt *OptimizerContext) ExtendEnv(opts ...EnvOption) error { |
| 252 | e, err := opt.Env.Extend(opts...) |
| 253 | if err != nil { |
| 254 | return err |
| 255 | } |
| 256 | opt.Env = e |
| 257 | return nil |
| 258 | } |
| 259 | |
| 260 | // ASTOptimizer applies an optimization over an AST and returns the optimized result. |
| 261 | type ASTOptimizer interface { |