From 5a8dbc6347b3541e84fe669b22c17ad3b715e258 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 21 Jan 2026 20:22:09 +0100 Subject: Engage! --- queries/tsx.scm | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 queries/tsx.scm (limited to 'queries/tsx.scm') diff --git a/queries/tsx.scm b/queries/tsx.scm new file mode 100644 index 0000000..d5207a0 --- /dev/null +++ b/queries/tsx.scm @@ -0,0 +1,76 @@ +(function_declaration name: (identifier) @function) +(method_definition name: (property_identifier) @function) +(call_expression function: (identifier) @function) +(call_expression function: (member_expression property: (property_identifier) @function)) + +(type_identifier) @type +(predefined_type) @type + +(string) @string +(number) @number +(comment) @comment +(regex) @string +(template_string) @string + +(true) @boolean +(false) @boolean +(null) @null + +(property_signature name: (property_identifier) @property) +(public_field_definition name: (property_identifier) @property) + +[ + "function" + "return" + "if" + "else" + "for" + "while" + "do" + "switch" + "case" + "default" + "break" + "continue" + "var" + "let" + "const" + "try" + "catch" + "finally" + "class" + "extends" + "implements" + "import" + "export" + "from" + "async" + "await" + "new" + "interface" + "type" + "enum" + "public" + "private" + "protected" + "readonly" + "declare" + "module" + "namespace" + "abstract" + "as" + "keyof" + "typeof" + "instanceof" + "void" + "debugger" + "yield" +] @keyword + +(this) @keyword +(super) @keyword + +(jsx_opening_element name: (_) @function) +(jsx_closing_element name: (_) @function) +(jsx_self_closing_element name: (_) @function) +(jsx_attribute (property_identifier) @property) -- cgit v1.2.3