]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/tfdiags/hcl.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / tfdiags / hcl.go
index 24851f4d00480a900141cdbc77b5267228d4a7de..f9aec41c931502046b5f3bf604939c671a65e376 100644 (file)
@@ -40,6 +40,16 @@ func (d hclDiagnostic) Source() Source {
        return ret
 }
 
+func (d hclDiagnostic) FromExpr() *FromExpr {
+       if d.diag.Expression == nil || d.diag.EvalContext == nil {
+               return nil
+       }
+       return &FromExpr{
+               Expression:  d.diag.Expression,
+               EvalContext: d.diag.EvalContext,
+       }
+}
+
 // SourceRangeFromHCL constructs a SourceRange from the corresponding range
 // type within the HCL package.
 func SourceRangeFromHCL(hclRange hcl.Range) SourceRange {