From 6780814bb47188000f598357ffee22fa5e656545 Mon Sep 17 00:00:00 2001 From: Kazuma Watanabe Date: Sat, 29 Jul 2023 08:22:55 +0000 Subject: [PATCH] Add support for expression unwrapping in hclext.BoundExpr --- hclext/expression.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hclext/expression.go b/hclext/expression.go index 2b14dea..65f0e6a 100644 --- a/hclext/expression.go +++ b/hclext/expression.go @@ -45,3 +45,9 @@ func (e BoundExpr) Range() hcl.Range { func (e BoundExpr) StartRange() hcl.Range { return e.original.StartRange() } + +// UnwrapExpression returns the original expression. +// This satisfies the hcl.unwrapExpression interface. +func (e BoundExpr) UnwrapExpression() hcl.Expression { + return e.original +}