Added Zig grammar

This commit is contained in:
Himujjal 2021-03-23 06:18:43 +05:30 committed by Stephan Seitz
parent 74234bc0e0
commit 597ec69378
7 changed files with 266 additions and 0 deletions

25
queries/zig/locals.scm Normal file
View file

@ -0,0 +1,25 @@
(function_declaration
name: (identifier) @definition.function
)
((type_identifier) @reference
(set! reference.kind "type"))
(assignment_statement
name: (identifier) @definition.var
)
(identifier) @reference
; Scopes
[
(block)
(comptime_block)
(defer_block)
(suspend_block)
(resume_block)
(if_expression)
(while_expression)
(for_expression)
(test_expression)
] @scope