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 | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/runtime/queries/tsq/highlights.scm b/runtime/queries/tsq/highlights.scm index 4ef463a6..5ef6bf4c 100644 --- a/runtime/queries/tsq/highlights.scm +++ b/runtime/queries/tsq/highlights.scm @@ -1,50 +1,50 @@ -((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 +(((comment) @keyword.directive) + (#match? @keyword.directive "^; +inherits *:")) [ - "[" - "]" "(" ")" + "[" + "]" ] @punctuation.bracket -"." @operator - -(quantifier) @operator +":" @punctuation.delimiter +"!" @operator -(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) @variable.other.member (capture) @label +((predicate_name) @function + (#any-of? @function "#eq?" "#match?" "#any-of?" "#not-any-of?" "#is?" "#is-not?" "#not-same-line?" "#not-kind-eq?" "#set!" "#select-adjacent!" "#strip!")) +(predicate_name) @error + (escape_sequence) @constant.character.escape -(string) @string +(node_name) @tag +(variable) @variable |