Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align hcl.Block & hclsyntax.Block DefRange
This patch fixes a minor discrepancy between `hclsyntax` and `hcl` in how DefRange is computed for a block. DefRange of the "higher-level" `hcl.Block` (typically used by most applications) ends with the last label. DefRange of the "lower-level" `hclsyntax.Block` ended with the opening brace `{` (i.e. at least 2 characters further). Here we align the low-level API with the high-level one, meaning that most consumers should not be affected by this change, partly because they use `hcl.Block` (which isn't changing) or because they use DefRange to inform some non-critical decisions such as enriching diagnostics.
- Loading branch information