feat(d)!: switch upstream parser to gdamore/tree-sitter-d

This commit is contained in:
Amaan Qureshi 2024-01-26 02:48:26 -05:00
parent cbf0dfd92f
commit 76700e147b
8 changed files with 463 additions and 272 deletions

View file

@ -1,9 +1,18 @@
([
(line_comment)
(block_comment)
(nesting_block_comment)
] @injection.content
((comment) @injection.content
(#set! injection.language "comment"))
((token_string_tokens) @injection.content
(#set! injection.language "d"))
((call_expression
(type) @_printf
(arguments
"("
.
(expression
(string_literal) @injection.content)))
(#eq? @_printf "printf")
(#offset! @injection.content 0 1 0 -1)
(#set! injection.language "printf"))
; TODO: uncomment when asm is added
; ((asm_inline) @injection.content
; (#set! injection.language "asm")
; (#set! injection.combined))