| Age | Commit message (Collapse) | Author |
|
* [COMPLIANCE] Add Copyright and License Headers
* add copywrite file and revert headers in testdata
---------
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Liam Cervante <liam.cervante@hashicorp.com>
|
|
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.
|
|
The main HCL package is more visible this way, and so it's easier than
having to pick it out from dozens of other package directories.
|