treat jinja as comments in hcl

This commit is contained in:
2025-10-06 16:22:40 -06:00
parent 257abf0c72
commit 169afdafda
3 changed files with 1449 additions and 1428 deletions

View File

@@ -349,6 +349,7 @@ module.exports = function make_grammar(dialect) {
comment: ($) => comment: ($) =>
token( token(
choice( choice(
seq("{%", /.*/),
seq("#", /.*/), seq("#", /.*/),
seq("//", /.*/), seq("//", /.*/),
seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, "/"), seq("/*", /[^*]*\*+([^/*][^*]*\*+)*/, "/"),

15
src/grammar.json generated
View File

@@ -1695,6 +1695,19 @@
"content": { "content": {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{%"
},
{
"type": "PATTERN",
"value": ".*"
}
]
},
{ {
"type": "SEQ", "type": "SEQ",
"members": [ "members": [
@@ -1798,4 +1811,4 @@
"inline": [], "inline": [],
"supertypes": [], "supertypes": [],
"reserved": {} "reserved": {}
} }

2861
src/parser.c generated

File diff suppressed because it is too large Load Diff