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