]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/hashicorp/hcl2/hcl/eval_context.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / hcl2 / hcl / eval_context.go
CommitLineData
15c0b25d
AP
1package hcl
2
3import (
4 "github.com/zclconf/go-cty/cty"
5 "github.com/zclconf/go-cty/cty/function"
6)
7
8// An EvalContext provides the variables and functions that should be used
9// to evaluate an expression.
10type EvalContext struct {
11 Variables map[string]cty.Value
12 Functions map[string]function.Function
13 parent *EvalContext
14}
15
16// NewChild returns a new EvalContext that is a child of the receiver.
17func (ctx *EvalContext) NewChild() *EvalContext {
18 return &EvalContext{parent: ctx}
19}
20
21// Parent returns the parent of the receiver, or nil if the receiver has
22// no parent.
23func (ctx *EvalContext) Parent() *EvalContext {
24 return ctx.parent
25}