github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/steampipeconfig/modconfig/var_config/util.go (about)

     1  package var_config
     2  
     3  import (
     4  	"github.com/hashicorp/hcl/v2"
     5  	"github.com/hashicorp/hcl/v2/hclsyntax"
     6  )
     7  
     8  // exprIsNativeQuotedString determines whether the given expression looks like
     9  // it's a quoted string in the HCL native syntax.
    10  //
    11  // This should be used sparingly only for situations where our legacy HCL
    12  // decoding would've expected a keyword or reference in quotes but our new
    13  // decoding expects the keyword or reference to be provided directly as
    14  // an identifier-based expression.
    15  func exprIsNativeQuotedString(expr hcl.Expression) bool {
    16  	_, ok := expr.(*hclsyntax.TemplateExpr)
    17  	return ok
    18  }