Skip to content

Commit 050e1d9

Browse files
authored
feat: add a tree-sitter grammar for Doxyfile (#14235)
1 parent 2b9cc20 commit 050e1d9

File tree

7 files changed

+45
-0
lines changed

7 files changed

+45
-0
lines changed

book/src/generated/lang-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
| docker-compose |||| | | `docker-compose-langserver`, `yaml-language-server` |
4848
| dockerfile ||| | | | `docker-langserver` |
4949
| dot || | | | | `dot-language-server` |
50+
| doxyfile ||||| | |
5051
| dtd || | | | | |
5152
| dune || | | | | |
5253
| dunstrc || | | | | |

languages.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4639,3 +4639,15 @@ file-types = [{ glob = "requirements.txt" }, { glob = "constraints.txt" }]
46394639
[[grammar]]
46404640
name = "requirements"
46414641
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-requirements", rev = "caeb2ba854dea55931f76034978de1fd79362939" }
4642+
4643+
[[language]]
4644+
name = "doxyfile"
4645+
scope = "source.doxyfile"
4646+
injection-regex = "[Dd]oxyfile"
4647+
file-types = [{ glob = "Doxyfile" }]
4648+
comment-token = "#"
4649+
indent = { tab-width = 4, unit = " " }
4650+
4651+
[[grammar]]
4652+
name = "doxyfile"
4653+
source = { git = "https://github.com/tingerrr/tree-sitter-doxyfile/", rev = "18e44c6da639632a4e42264c7193df34be915f34" }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
(comment) @comment.line
2+
3+
(identifier) @variable
4+
5+
(boolean) @constant.builtin.boolean
6+
(number) @constant.numeric.integer
7+
[
8+
(unquoted_string)
9+
(quoted_string)
10+
] @string
11+
12+
[
13+
"\\"
14+
] @punctuation.delimiter
15+
16+
[
17+
"="
18+
"+="
19+
] @operator
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(option
2+
value: (_) @anchor
3+
(#set! "scope" "tail")) @align
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
((comment
2+
body: (_) @injection.content)
3+
(#set! injection.language "comment"))

runtime/queries/doxyfile/tags.scm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
(option
2+
key: (_) @definition.constant)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(option
2+
value: (_) @entry.inside) @entry.around
3+
4+
(comment) @comment.inside
5+
(comment)+ @comment.around

0 commit comments

Comments
 (0)