blob: 7e652e9bc64b9317607eaa1b73bc91df2431ab9e (
plain) (
tree)
|
|
package hcldec
import (
"github.com/hashicorp/hcl2/hcl"
)
type blockLabel struct {
Value string
Range hcl.Range
}
func labelsForBlock(block *hcl.Block) []blockLabel {
ret := make([]blockLabel, len(block.Labels))
for i := range block.Labels {
ret[i] = blockLabel{
Value: block.Labels[i],
Range: block.LabelRanges[i],
}
}
return ret
}
|