mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
Update queries
- Don't use the old form for predicates - Update some invalid queries
This commit is contained in:
parent
6c5f4b1b49
commit
56634f49ab
7 changed files with 19 additions and 19 deletions
|
|
@ -3,7 +3,7 @@
|
|||
;((identifier) @type ; exception: mark `A_foo` sort of identifiers as variables
|
||||
;(match? @type "^[A-Z][^_]"))
|
||||
((identifier) @constant
|
||||
(match? @constant "^[A-Z][A-Z_]{2}[A-Z_]*$"))
|
||||
(#match? @constant "^[A-Z][A-Z_]{2}[A-Z_]*$"))
|
||||
|
||||
[
|
||||
(triple_string)
|
||||
|
|
@ -89,11 +89,11 @@
|
|||
(number) @number
|
||||
(range_expression
|
||||
(identifier) @number
|
||||
(eq? @number "end"))
|
||||
(#eq? @number "end"))
|
||||
(range_expression
|
||||
(_
|
||||
(identifier) @number
|
||||
(eq? @number "end")))
|
||||
(#eq? @number "end")))
|
||||
(coefficient_expression
|
||||
(number)
|
||||
(identifier) @constant.builtin)
|
||||
|
|
@ -173,9 +173,9 @@
|
|||
|
||||
((identifier) @include (#eq? @include "baremodule"))
|
||||
|
||||
(((identifier) @constant.builtin) (match? @constant.builtin "^(nothing|Inf|NaN)$"))
|
||||
(((identifier) @boolean) (eq? @boolean "true"))
|
||||
(((identifier) @boolean) (eq? @boolean "false"))
|
||||
(((identifier) @constant.builtin) (#match? @constant.builtin "^(nothing|Inf|NaN)$"))
|
||||
(((identifier) @boolean) (#eq? @boolean "true"))
|
||||
(((identifier) @boolean) (#eq? @boolean "false"))
|
||||
|
||||
["::" ":" "." "," "..." "!"] @punctuation.delimiter
|
||||
["[" "]" "(" ")" "{" "}"] @punctuation.bracket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue