Skip to content

Commit

Permalink
decoder: remove dead code (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Jan 5, 2024
1 parent 45db9fd commit 6651691
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions decoder/reference_targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,6 @@ func (d *PathDecoder) collectInferredReferenceTargetsForBody(addr lang.Address,
}

attrAddr := append(addr.Copy(), lang.AttrStep{Name: name})

legacyRef := reference.Target{
Addr: attrAddr,
ScopeId: bAddrSchema.ScopeId,
Type: attrType,
Description: aSchema.Description,
RangePtr: body.MissingItemRange().Ptr(),
}

targetCtx := &TargetContext{
ParentAddress: attrAddr,
ScopeId: bAddrSchema.ScopeId,
Expand All @@ -440,19 +431,13 @@ func (d *PathDecoder) collectInferredReferenceTargetsForBody(addr lang.Address,
localAddr := make(lang.Address, len(selfRefAddr))
copy(localAddr, selfRefAddr)
localAddr = append(localAddr, lang.AttrStep{Name: name})

legacyRef.LocalAddr = localAddr
legacyRef.TargetableFromRangePtr = selfRefBodyRangePtr.Ptr()

targetCtx.ParentLocalAddress = localAddr
targetCtx.TargetableFromRangePtr = selfRefBodyRangePtr.Ptr()
}

var attrExpr hcl.Expression
if attr, ok := content.Attributes[name]; ok {
legacyRef.RangePtr = attr.Range.Ptr()
targetCtx.ParentRangePtr = attr.Range.Ptr()
legacyRef.DefRangePtr = attr.NameRange.Ptr()
targetCtx.ParentDefRangePtr = attr.NameRange.Ptr()
attrExpr = attr.Expr
}
Expand Down

0 comments on commit 6651691

Please sign in to comment.