diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/tfdiags/hcl.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/tfdiags/hcl.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/tfdiags/hcl.go b/vendor/github.com/hashicorp/terraform/tfdiags/hcl.go index 24851f4..f9aec41 100644 --- a/vendor/github.com/hashicorp/terraform/tfdiags/hcl.go +++ b/vendor/github.com/hashicorp/terraform/tfdiags/hcl.go | |||
@@ -40,6 +40,16 @@ func (d hclDiagnostic) Source() Source { | |||
40 | return ret | 40 | return ret |
41 | } | 41 | } |
42 | 42 | ||
43 | func (d hclDiagnostic) FromExpr() *FromExpr { | ||
44 | if d.diag.Expression == nil || d.diag.EvalContext == nil { | ||
45 | return nil | ||
46 | } | ||
47 | return &FromExpr{ | ||
48 | Expression: d.diag.Expression, | ||
49 | EvalContext: d.diag.EvalContext, | ||
50 | } | ||
51 | } | ||
52 | |||
43 | // SourceRangeFromHCL constructs a SourceRange from the corresponding range | 53 | // SourceRangeFromHCL constructs a SourceRange from the corresponding range |
44 | // type within the HCL package. | 54 | // type within the HCL package. |
45 | func SourceRangeFromHCL(hclRange hcl.Range) SourceRange { | 55 | func SourceRangeFromHCL(hclRange hcl.Range) SourceRange { |