Updated to latest grammars

This commit is contained in:
Martino Ferrari
2026-06-08 17:38:46 +02:00
parent 9aa4d5feff
commit e301b05805
8 changed files with 233 additions and 19 deletions
+33
View File
@@ -0,0 +1,33 @@
; ── Indent after opening braces ─────────────────────────────────────
(subnode "{" @indent) @branch
(array_literal "{" @indent) @branch
; ── Dedent on closing braces ───────────────────────────────────────
"}" @dedent
; ── Indent block bodies (if, foreach, template) ────────────────────
(if_block
"if" @branch
(_) @indent) @branch
(else_if_clause
"if" @branch
(_) @indent) @branch
(else_clause
"else" @branch
(_) @indent) @branch
(foreach_block
"foreach" @branch
(_) @indent) @branch
(template_definition
"template" @branch
(_) @indent) @branch
; ── Dedent on end keywords ─────────────────────────────────────────
"end" @dedent
; ── Dedent on else/else if (close previous block, open new) ────────
"else" @dedent