From bc728ecf253d7cbf1aef9eacac2f5341827856c5 Mon Sep 17 00:00:00 2001 From: dcho Date: Wed, 19 Mar 2025 18:39:43 -0400 Subject: Use order instead of priority --- queries/python/highlights.scm | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'queries/python/highlights.scm') diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 21bbbf4ec..84b29412a 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -35,19 +35,6 @@ function: (identifier) @_func)) (#any-of? @_func "TypeVar" "NewType")) -; Builtin functions -((call - function: (identifier) @function.builtin) - (#any-of? @function.builtin - "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" - "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" - "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" - "input" "int" "isinstance" "issubclass" "iter" "len" "list" "locals" "map" "max" "memoryview" - "min" "next" "object" "oct" "open" "ord" "pow" "print" "property" "range" "repr" "reversed" - "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" - "vars" "zip" "__import__") - (#set! priority 102)) - ; Function definitions (function_definition name: (identifier) @function) @@ -426,6 +413,18 @@ attribute: (identifier) @constructor)) (#lua-match? @constructor "^%u")) +; Builtin functions +((call + function: (identifier) @function.builtin) + (#any-of? @function.builtin + "abs" "all" "any" "ascii" "bin" "bool" "breakpoint" "bytearray" "bytes" "callable" "chr" + "classmethod" "compile" "complex" "delattr" "dict" "dir" "divmod" "enumerate" "eval" "exec" + "filter" "float" "format" "frozenset" "getattr" "globals" "hasattr" "hash" "help" "hex" "id" + "input" "int" "isinstance" "issubclass" "iter" "len" "list" "locals" "map" "max" "memoryview" + "min" "next" "object" "oct" "open" "ord" "pow" "print" "property" "range" "repr" "reversed" + "round" "set" "setattr" "slice" "sorted" "staticmethod" "str" "sum" "super" "tuple" "type" + "vars" "zip" "__import__")) + ; Regex from the `re` module (call function: (attribute -- cgit v1.2.3-70-g09d2