Env encapsulates the context necessary to perform parsing, type checking, or generation of evaluable programs for different expressions.
| 132 | // Env encapsulates the context necessary to perform parsing, type checking, or generation of |
| 133 | // evaluable programs for different expressions. |
| 134 | type Env struct { |
| 135 | Container *containers.Container |
| 136 | variables []*decls.VariableDecl |
| 137 | functions map[string]*decls.FunctionDecl |
| 138 | macros []Macro |
| 139 | contextProto protoreflect.MessageDescriptor |
| 140 | adapter types.Adapter |
| 141 | provider types.Provider |
| 142 | features map[int]bool |
| 143 | appliedFeatures map[int]bool |
| 144 | limits map[limitID]int |
| 145 | libraries map[string]SingletonLibrary |
| 146 | validators []ASTValidator |
| 147 | costOptions []checker.CostOption |
| 148 | |
| 149 | funcBindOnce sync.Once |
| 150 | functionBindings []*functions.Overload |
| 151 | |
| 152 | // Internal parser representation |
| 153 | prsr *parser.Parser |
| 154 | prsrOpts []parser.Option |
| 155 | |
| 156 | // Internal checker representation |
| 157 | chkMutex sync.Mutex |
| 158 | chk *checker.Env |
| 159 | chkErr error |
| 160 | chkOnce sync.Once |
| 161 | chkOpts []checker.Option |
| 162 | |
| 163 | // Program options tied to the environment |
| 164 | progOpts []ProgramOption |
| 165 | } |
| 166 | |
| 167 | // ToConfig produces a YAML-serializable env.Config object from the given environment. |
| 168 | // |
nothing calls this directly
no outgoing calls
no test coverage detected