Namespaced functions in HCL that are not complete (e.g. provider::aws, a::, or a::b) return a ExprSyntaxError expression as long as there are no parentheses. However, if there's only one colon (e.g. a::b: or see gif below), hcl parses this differently and does not return an ExprSyntaxError for the position after the single colon.
Proposal
Either try to do some better recovery for these cases (tbd how) or find a fix in hcl that could catch these cases and allow looking for single colons when already parsing a namespaced function (this might only work after the first double colon though).
Background
Namespaced functions in HCL that are not complete (e.g.
provider::aws
,a::
, ora::b
) return aExprSyntaxError
expression as long as there are no parentheses. However, if there's only one colon (e.g.a::b:
or see gif below),hcl
parses this differently and does not return anExprSyntaxError
for the position after the single colon.Proposal
Either try to do some better recovery for these cases (tbd how) or find a fix in
hcl
that could catch these cases and allow looking for single colons when already parsing a namespaced function (this might only work after the first double colon though).