highlights(c_sharp): lots of improvements

This commit is contained in:
Luxed 2021-06-02 18:16:12 -04:00 committed by Stephan Seitz
parent 8e53e706e5
commit 7e40537769

View file

@ -9,28 +9,31 @@
(interpolation) @none (interpolation) @none
(invocation_expression (invocation_expression
(member_access_expression (member_access_expression
name: (identifier) @method)) name: (identifier) @method))
(invocation_expression
function: (conditional_access_expression
(member_binding_expression
name: (identifier) @method)))
(namespace_declaration (namespace_declaration
name: [(qualified_name) (identifier)] @namespace) name: [(qualified_name) (identifier)] @namespace)
((member_access_expression
(identifier) @type
(_) .)
(#match? @type "^[A-Z].*[a-z]"))
(qualified_name (qualified_name
(identifier) @type) (identifier) @type)
(invocation_expression (invocation_expression
(identifier) @method) (identifier) @method)
((identifier) @field (field_declaration
(#match? @field "^_")) (variable_declaration
(variable_declarator
(identifier) @field)))
((identifier) @field (initializer_expression
(#match? @field "^m_")) (assignment_expression
left: (identifier) @field))
(parameter_list (parameter_list
(parameter (parameter
@ -56,10 +59,11 @@
[ [
(predefined_type) (predefined_type)
(implicit_type)
(void_keyword) (void_keyword)
] @type.builtin ] @type.builtin
(implicit_type) @keyword
(comment) @comment (comment) @comment
(using_directive (using_directive
@ -68,6 +72,12 @@
(property_declaration (property_declaration
name: (identifier) @property) name: (identifier) @property)
(property_declaration
type: (identifier) @type)
(nullable_type
(identifier) @type)
(catch_declaration (catch_declaration
type: (identifier) @type) type: (identifier) @type)
@ -88,15 +98,29 @@
(generic_name (generic_name
(identifier) @type) (identifier) @type)
(invocation_expression
(member_access_expression
(generic_name
(identifier) @method)))
(base_list (base_list
(identifier) @type) (identifier) @type)
(type_argument_list (type_argument_list
(identifier) @type) (identifier) @type)
(type_parameter_list
(type_parameter) @type)
(type_parameter_constraints_clause
target: (identifier) @type)
(attribute (attribute
name: (identifier) @attribute) name: (identifier) @attribute)
(for_each_statement
type: (identifier) @type)
[ [
"if" "if"
"else" "else"
@ -228,5 +252,6 @@
"struct" "struct"
"get" "get"
"set" "set"
"where"
] @keyword ] @keyword