feat: support hcl #210
8 changed files with 31 additions and 0 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -525,6 +525,7 @@ dependencies = [
|
|||
"tree-sitter-dart",
|
||||
"tree-sitter-devicetree",
|
||||
"tree-sitter-go",
|
||||
"tree-sitter-hcl",
|
||||
"tree-sitter-html",
|
||||
"tree-sitter-java",
|
||||
"tree-sitter-javascript",
|
||||
|
@ -988,6 +989,16 @@ dependencies = [
|
|||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-hcl"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a7b2cc3d7121553b84309fab9d11b3ff3d420403eef9ae50f9fd1cd9d9cf012"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-html"
|
||||
version = "0.23.2"
|
||||
|
|
|
@ -38,6 +38,7 @@ tree-sitter-lua = "0.2.0"
|
|||
tree-sitter-ruby = "0.23.1"
|
||||
tree-sitter-properties = "0.3.0"
|
||||
tree-sitter-md = "0.3.2"
|
||||
tree-sitter-hcl = "1.1.0"
|
||||
regex = "1.11.1"
|
||||
itertools = "0.14.0"
|
||||
tree-sitter-nix = "0.0.2"
|
||||
|
|
|
@ -27,6 +27,7 @@ and the following declarative file formats:
|
|||
* TOML (*.toml)
|
||||
* Devicetree Source (*.dts)
|
||||
* Java properties files (*.properties)
|
||||
* HCL (*.hcl, *.tf, *.tfvars)
|
||||
|
||||
This list can also be obtained with the `mergiraf languages` command.
|
||||
|
||||
|
|
2
examples/hcl/working/tuple_support/Base.hcl
Normal file
2
examples/hcl/working/tuple_support/Base.hcl
Normal file
|
@ -0,0 +1,2 @@
|
|||
variable_is_tuple = ["bar"]
|
||||
tuple_loop = [for value in ["bar"]: value]
|
2
examples/hcl/working/tuple_support/Expected.hcl
Normal file
2
examples/hcl/working/tuple_support/Expected.hcl
Normal file
|
@ -0,0 +1,2 @@
|
|||
variable_is_tuple = ["foo", "bar", "baz"]
|
||||
tuple_loop = [for value in ["foo", "bar", "baz"]: value]
|
2
examples/hcl/working/tuple_support/Left.hcl
Normal file
2
examples/hcl/working/tuple_support/Left.hcl
Normal file
|
@ -0,0 +1,2 @@
|
|||
variable_is_tuple = ["foo", "bar"]
|
||||
tuple_loop = [for value in ["foo", "bar"]: value]
|
2
examples/hcl/working/tuple_support/Right.hcl
Normal file
2
examples/hcl/working/tuple_support/Right.hcl
Normal file
|
@ -0,0 +1,2 @@
|
|||
variable_is_tuple = ["bar", "baz"]
|
||||
tuple_loop = [for value in ["bar", "baz"]: value]
|
|
@ -775,6 +775,16 @@ pub static SUPPORTED_LANGUAGES: LazyLock<Vec<LangProfile>> = LazyLock::new(|| {
|
|||
signatures: vec![],
|
||||
injections: Some(tree_sitter_md::INJECTION_QUERY_BLOCK),
|
||||
},
|
||||
LangProfile {
|
||||
name: "HCL",
|
||||
alternate_names: &[],
|
||||
extensions: vec!["hcl", "tf", "tfvars"],
|
||||
language: tree_sitter_hcl::LANGUAGE.into(),
|
||||
atomic_nodes: vec![],
|
||||
commutative_parents: vec![],
|
||||
signatures: vec![],
|
||||
injections: None,
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue