summaryrefslogtreecommitdiff
path: root/hclsyntax/structure.go
AgeCommit message (Collapse)Author
2023-02-28[COMPLIANCE] Add Copyright and License Headers (#586)hashicorp-copywrite[bot]
* [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>
2021-09-22Merge pull request #487 from hashicorp/align-def-rangeRadek Simko
Align `hcl.Block` & `hclsyntax.Block` `DefRange`
2021-09-22hclsyntax: Clarify Body.EndRange commentRadek Simko
2021-09-22Align hcl.Block & hclsyntax.Block DefRangeRadek Simko
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.
2019-09-09Unfold the "hcl" directory up into the rootMartin Atkins
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.