Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/tsq/highlights.scm')
| -rw-r--r-- | runtime/queries/tsq/highlights.scm | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/runtime/queries/tsq/highlights.scm b/runtime/queries/tsq/highlights.scm index 4ef463a6..9ba5699a 100644 --- a/runtime/queries/tsq/highlights.scm +++ b/runtime/queries/tsq/highlights.scm @@ -1,50 +1,46 @@ -((program - . - (comment)* - . - (comment) @keyword.import) - (#match? @keyword.import "^;+ *inherits *:")) +; mark the string passed #match? as a regex +(((predicate_name) @function + (capture) + (string) @string.regexp) + (#eq? @function "#match?")) -((parameters - (identifier) @constant.numeric) - (#match? @constant.numeric "^[-+]?[0-9]+(.[0-9]+)?$")) - -"_" @constant - -":" @punctuation.delimiter +; highlight inheritance comments +((query . (comment) @keyword.directive) + (#match? @keyword.directive "^;\ +inherits *:")) [ - "[" - "]" "(" ")" + "[" + "]" ] @punctuation.bracket -"." @operator - -(quantifier) @operator +":" @punctuation.delimiter -(comment) @comment +[ + (one_or_more) + (zero_or_one) + (zero_or_more) +] @operator -(negated_field - "!" @operator - (identifier) @variable.other.member) +[ + (wildcard_node) + (anchor) +] @constant.builtin -(field_definition - name: (identifier) @variable.other.member) +[ + (anonymous_leaf) + (string) +] @string -(named_node - name: (identifier) @tag) +(comment) @comment -(predicate name: (identifier) @error) -((predicate - "#" @function.builtin - name: (identifier) @function.builtin @_name - type: (predicate_type) @function.builtin) - (#any-of? @_name "eq" "not-eq" "match" "not-match" "any-of" "not-any-of" "is" "is-not" "not-same-line" "not-kind-eq" "set" "select-adjacent" "strip")) +(field_name) @property (capture) @label -(escape_sequence) @constant.character.escape +(predicate_name) @function + +(escape_sequence) @escape -(string) @string +(node_name) @variable |