branch: externals/csharp-mode
commit 03b82843f76ccf3558d18a70b6e7b084e8fe892d
Author: Theodor Thornhill <[email protected]>
Commit: Theodor Thornhill <[email protected]>
Add type constraints and lambda support
---
csharp-tree-sitter.el | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/csharp-tree-sitter.el b/csharp-tree-sitter.el
index 0d93601..dea5172 100644
--- a/csharp-tree-sitter.el
+++ b/csharp-tree-sitter.el
@@ -127,6 +127,10 @@
(local_function_statement (void_keyword) @type (identifier) @function)
(local_function_statement (generic_name) (identifier) @function)
+ ;; Lambda
+ (lambda_expression
+ (identifier) @variable)
+
;; Parameter
(parameter
type: (identifier) @type
@@ -170,6 +174,14 @@
(nullable_type) @type
["operator"] @type
+ ;; Type constraints
+ (type_parameter_constraints_clause
+ (identifier) @type)
+ (type_parameter_constraint
+ (identifier) @type)
+ (type_constraint
+ (identifier) @type)
+
;; Exprs
(binary_expression (identifier) @variable (identifier) @variable)
(binary_expression (identifier)* @variable)