feat: add @comment.documentation where applicable

This commit is contained in:
Amaan Qureshi 2023-03-02 08:06:35 -05:00
parent 3a82b58745
commit 5a87bc98da
32 changed files with 256 additions and 58 deletions

View file

@ -196,20 +196,46 @@
(float_literal) @float
(imaginary_literal) @number
(true) @boolean
(false) @boolean
[
(true)
(false)
] @boolean
(nil) @constant.builtin
(keyed_element
. (literal_element (identifier) @field))
(field_declaration name: (field_identifier) @field)
; Comments
(comment) @comment @spell
;; Doc Comments
(source_file . (comment)+ @comment.documentation)
(source_file
(comment)+ @comment.documentation
. (const_declaration))
(source_file
(comment)+ @comment.documentation
. (function_declaration))
(source_file
(comment)+ @comment.documentation
. (type_declaration))
(source_file
(comment)+ @comment.documentation
. (var_declaration))
; Errors
(ERROR) @error
; Spell
((interpreted_string_literal) @spell
(#not-has-parent? @spell
import_spec
)
)
(#not-has-parent? @spell import_spec))