mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 20:30:05 -04:00
remove redundant checks in render mode queries and doc comments
This commit is contained in:
parent
9ab1ab38af
commit
e9440e84f5
1 changed files with 0 additions and 32 deletions
|
|
@ -128,17 +128,9 @@
|
||||||
|
|
||||||
; spatial
|
; spatial
|
||||||
(source_file
|
(source_file
|
||||||
; only comments and preprocessor directives are allowed before a shader type so ignore shader type
|
|
||||||
; statements in any other node
|
|
||||||
[
|
|
||||||
(comment)
|
|
||||||
(preproc)
|
|
||||||
]*
|
|
||||||
.
|
|
||||||
(shader_type_statement
|
(shader_type_statement
|
||||||
(shader_type) @_shader_type)
|
(shader_type) @_shader_type)
|
||||||
(#eq? @_shader_type "spatial")
|
(#eq? @_shader_type "spatial")
|
||||||
(_)*
|
|
||||||
(render_mode_statement
|
(render_mode_statement
|
||||||
(render_mode) @keyword)
|
(render_mode) @keyword)
|
||||||
(#any-of? @keyword
|
(#any-of? @keyword
|
||||||
|
|
@ -153,15 +145,9 @@
|
||||||
|
|
||||||
; canvas_item
|
; canvas_item
|
||||||
(source_file
|
(source_file
|
||||||
[
|
|
||||||
(comment)
|
|
||||||
(preproc)
|
|
||||||
]*
|
|
||||||
.
|
|
||||||
(shader_type_statement
|
(shader_type_statement
|
||||||
(shader_type) @_shader_type)
|
(shader_type) @_shader_type)
|
||||||
(#eq? @_shader_type "canvas_item")
|
(#eq? @_shader_type "canvas_item")
|
||||||
(_)*
|
|
||||||
(render_mode_statement
|
(render_mode_statement
|
||||||
(render_mode) @keyword)
|
(render_mode) @keyword)
|
||||||
(#any-of? @keyword
|
(#any-of? @keyword
|
||||||
|
|
@ -170,30 +156,18 @@
|
||||||
|
|
||||||
; particle
|
; particle
|
||||||
(source_file
|
(source_file
|
||||||
[
|
|
||||||
(comment)
|
|
||||||
(preproc)
|
|
||||||
]*
|
|
||||||
.
|
|
||||||
(shader_type_statement
|
(shader_type_statement
|
||||||
(shader_type) @_shader_type)
|
(shader_type) @_shader_type)
|
||||||
(#eq? @_shader_type "particle")
|
(#eq? @_shader_type "particle")
|
||||||
(_)*
|
|
||||||
(render_mode_statement
|
(render_mode_statement
|
||||||
(render_mode) @keyword)
|
(render_mode) @keyword)
|
||||||
(#any-of? @keyword "keep_data" "disable_force" "disable_velocity" "collision_use_scale"))
|
(#any-of? @keyword "keep_data" "disable_force" "disable_velocity" "collision_use_scale"))
|
||||||
|
|
||||||
; sky
|
; sky
|
||||||
(source_file
|
(source_file
|
||||||
[
|
|
||||||
(comment)
|
|
||||||
(preproc)
|
|
||||||
]*
|
|
||||||
.
|
|
||||||
(shader_type_statement
|
(shader_type_statement
|
||||||
(shader_type) @_shader_type)
|
(shader_type) @_shader_type)
|
||||||
(#eq? @_shader_type "sky")
|
(#eq? @_shader_type "sky")
|
||||||
(_)*
|
|
||||||
(render_mode_statement
|
(render_mode_statement
|
||||||
(render_mode) @keyword)
|
(render_mode) @keyword)
|
||||||
(#any-of? @keyword "use_half_res_pass" "use_quarter_res_pass" "disable_fog"))
|
(#any-of? @keyword "use_half_res_pass" "use_quarter_res_pass" "disable_fog"))
|
||||||
|
|
@ -223,12 +197,6 @@
|
||||||
|
|
||||||
; technically an injection site for bbcode TODO: maybe add it?
|
; technically an injection site for bbcode TODO: maybe add it?
|
||||||
((comment) @comment.documentation @spell
|
((comment) @comment.documentation @spell
|
||||||
.
|
|
||||||
[
|
|
||||||
(struct_definition)
|
|
||||||
(declaration)
|
|
||||||
(function_definition)
|
|
||||||
]
|
|
||||||
(#lua-match? @comment.documentation "^/%*%*[^/]"))
|
(#lua-match? @comment.documentation "^/%*%*[^/]"))
|
||||||
|
|
||||||
(parameter_declaration
|
(parameter_declaration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue