Skip to content

Commit

Permalink
decoder: Add comment to clarify reason for condition
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Apr 3, 2023
1 parent 7314ce0 commit ef1948e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions decoder/expr_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (fe functionExpr) CompletionAtPos(ctx context.Context, pos hcl.Pos) []lang.
switch eType := fe.expr.(type) {
case *hclsyntax.ScopeTraversalExpr:
if len(eType.Traversal) > 1 {
// We assume that function names cannot contain dots
return []lang.Candidate{}
}
prefixLen := pos.Byte - eType.Traversal.SourceRange().Start.Byte
Expand Down

0 comments on commit ef1948e

Please sign in to comment.