mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 08:50:11 -04:00
feat(slint)!: change to the official parser (#6027)
This change replaces the slint parser written and maintained by @jrmoulton with the official one hosted in the slint-ui organization on github. A huge thank you to @jrmoulton for all his work on the tree-sitter parser! --------- Co-authored-by: jrmoulton <jaredmoulton3@gmail.com>
This commit is contained in:
parent
f0d43eff13
commit
0f3183dda8
9 changed files with 401 additions and 156 deletions
|
|
@ -1,8 +1,28 @@
|
|||
(macro_invocation
|
||||
macro:
|
||||
[
|
||||
(scoped_identifier
|
||||
name: (_) @_macro_name)
|
||||
(identifier) @_macro_name
|
||||
]
|
||||
(token_tree) @injection.content
|
||||
(#not-eq? @_macro_name "slint")
|
||||
(#set! injection.language "rust")
|
||||
(#set! injection.include-children))
|
||||
|
||||
(macro_invocation
|
||||
macro:
|
||||
[
|
||||
(scoped_identifier
|
||||
name: (_) @_macro_name)
|
||||
(identifier) @_macro_name
|
||||
]
|
||||
(token_tree) @injection.content
|
||||
(#eq? @_macro_name "slint")
|
||||
(#offset! @injection.content 0 1 0 -1)
|
||||
(#set! injection.language "slint")
|
||||
(#set! injection.include-children))
|
||||
|
||||
(macro_definition
|
||||
(macro_rule
|
||||
left: (token_tree_pattern) @injection.content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue