Skip to main content

HCL and terraform grammar for tree-sitter

Project description

tree-sitter-hcl

tree-sitter grammar for the HCL language

Try It Out

Try the parser in the playground

Example

Highlighting example/example.hcl:

Highlighting Example

Developing

It is recommended to use nix to fulfill all development dependencies. To activate the development environment simply run nix-shell in the project root.

Running Tests

To run tests simply run nix-shell --run 'tree-sitter test'.

Compliance

The directory example/real_world_stuff contains a corpus of hcl files that I found with the github query language:HCL for users coreos, hashicorp, oracle and terraform-community-modules.

tree-sitter parse --quiet --stat example/real_world_stuff/*/*

Total parses: 1892; successful parses: 1892; failed parses: 0; success percentage: 100.00%

Fuzzing

See the fuzzing repo for this parser

Attributions

Pages were copied from https://github.com/m-novikov/tree-sitter-sql

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_hcl-1.2.0.tar.gz (55.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_hcl-1.2.0-cp310-abi3-win_arm64.whl (30.9 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_hcl-1.2.0-cp310-abi3-win_amd64.whl (32.6 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_hcl-1.2.0-cp310-abi3-musllinux_1_2_x86_64.whl (51.6 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (54.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (54.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

tree_sitter_hcl-1.2.0-cp310-abi3-macosx_11_0_arm64.whl (31.2 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_hcl-1.2.0-cp310-abi3-macosx_10_9_x86_64.whl (30.6 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_hcl-1.2.0.tar.gz.

File metadata

  • Download URL: tree_sitter_hcl-1.2.0.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tree_sitter_hcl-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f86cb7a9fd5cb93d83e2f788ae155544464c47755d09190505de562c0d6ad1dd
MD5 8dba2d5aede07abb32277f843923c52b
BLAKE2b-256 06c9ed79f643b0cec3e123171c09caffb6088a6111025a20fc69112b1468828b

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 689425894a69423301e0e05faff472317e7ab4013767bce4a33b9234778c275e
MD5 09042880d38585dbce90ca84d84a0ad9
BLAKE2b-256 bedee8dbfe36c70954dac62da4ca9a2fcff067eb097b48bd4b55fc836b2efd81

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4ac026d83d72216444963dfb603fc3e1806aca0a5cb3c236d14e82f20fb7b5de
MD5 9165b11dc025f0826814a60b1db0fa9d
BLAKE2b-256 27a6f15096c138eccc0c68b7254c75a8121bab326b62920f2d259079b2d6a7d0

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5b6c6aaccfca2fde4fcce52aa88d8c3756f44d407b8584fc3cff581d8765b4b7
MD5 a488d52eeb0d777c8c102e0d1858e809
BLAKE2b-256 f440cc843f07210caa0a2e2a2b3581f93c917ed2139cb0851b32f4852141c95c

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 915763da6630610c2efb7afe13145f50feb8043732a74f9bae78811212578d3d
MD5 1c11bd28c9a90c1f3cccc841abf6eacd
BLAKE2b-256 ee0a01bb627044d273e8e506edff8ab773e562ba447b5790b789f62e47a5e754

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d2e9f3cfb6694e33f5b880e74bed842398cbacd21024251e2ec90f19dee6a64d
MD5 21ab1635a3b95bb4df3e783876df563e
BLAKE2b-256 1235b8f87fffb5527c85f5f292486e53f64963846b94cf3ea258f4b850480f18

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 03678762e8b78d717187848edebed95e4c31a54e14f24dec97555f47fb440e28
MD5 3a5aa4aecc9069f3c857b33cb1403c19
BLAKE2b-256 8e8b7618448cde58ca6fbefcf210ef98d7c4bd7d2b54b3e3d5cddd947c804a18

See more details on using hashes here.

File details

Details for the file tree_sitter_hcl-1.2.0-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_hcl-1.2.0-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9ae35084a3dc12272f941b424eadd8a44cf2e0e9345b020330cf8db6f67d3524
MD5 135f903415e5b63809da0a9617772e58
BLAKE2b-256 77347ccb58107ae0d38e0a8f05dedbd990780eb7d429f227725c15fee314cdcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page