aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go')
-rw-r--r--vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
index 253ad50..772ebae 100644
--- a/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
+++ b/vendor/github.com/hashicorp/hcl2/hcl/hclsyntax/parser.go
@@ -853,6 +853,14 @@ Traversal:
853 SrcRange: rng, 853 SrcRange: rng,
854 } 854 }
855 ret = makeRelativeTraversal(ret, step, rng) 855 ret = makeRelativeTraversal(ret, step, rng)
856 } else if tmpl, isTmpl := keyExpr.(*TemplateExpr); isTmpl && tmpl.IsStringLiteral() {
857 litKey, _ := tmpl.Value(nil)
858 rng := hcl.RangeBetween(open.Range, close.Range)
859 step := hcl.TraverseIndex{
860 Key: litKey,
861 SrcRange: rng,
862 }
863 ret = makeRelativeTraversal(ret, step, rng)
856 } else { 864 } else {
857 rng := hcl.RangeBetween(open.Range, close.Range) 865 rng := hcl.RangeBetween(open.Range, close.Range)
858 ret = &IndexExpr{ 866 ret = &IndexExpr{