]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/commitdiff
Define identifiers as type definitions
authorRuben Beltran del Rio <redacted>
Wed, 4 Oct 2023 14:41:51 +0000 (16:41 +0200)
committerRuben Beltran del Rio <redacted>
Wed, 4 Oct 2023 14:41:51 +0000 (16:41 +0200)
queries/highlights.scm
test/highlight/notation.api

index b7a3e9e2b49fb8b95c86c1e9356176ffd460a523..cf92992bd72c6f263dc7e5fea91782f24e0760c2 100644 (file)
@@ -4,7 +4,7 @@
 (parameter_list) @function
 (parameter_list (identifier (optional_value) @variable.parameter.optional))
 (parameter_list (identifier) @variable.parameter)
-(identifier) @keyword
+(identifier) @type.definition
 (throw_statement) @operator
 (return_statement) @operator
 (comment) @comment
index c20f11a72e10253b9d663aacd3ffebde758c62f6..f0a9a7a3f9c7cf8651070b4cc6f93a85ef76f163 100644 (file)
@@ -1,14 +1,14 @@
 Forum.Models.Post
-// <- keyword
-//    ^ keyword
-//           ^ keyword
+// <- type.definition
+//    ^ type.definition
+//           ^ type.definition
   +glyphs <Array<String>>
   //<- operator
   //^ property
   //      ^ type
-  //       ^ keyword
+  //       ^ type.definition
   //            ^ type
-  //             ^ keyword
+  //             ^ type.definition
   //                    ^ type
 
   -id <UUID>
@@ -22,7 +22,7 @@ Forum.Models.Post
   //           ^ function
   //            ^ variable.parameter
   //                 ^ type
-  //                  ^ keyword
+  //                  ^ type.definition
   //                        ^ type
   //                         ^ function
   ->authorUpdated(author <Author>)
@@ -36,13 +36,13 @@ Forum.Models.Post
   //      ^ function
   //       ^ variable.parameter
   //                 ^ type
-  //                  ^ keyword
+  //                  ^ type.definition
   //                      ^ type
   //                       ^ function
   //                         ^ operator
-  //                            ^ keyword
+  //                            ^ type.definition
   //                                                              ^ operator
-  //                                                                 ^ keyword
+  //                                                                 ^ type.definition
   ::get(id <UUID>) => Promise<Forum.Models.Post>
   #update(text <String>) => Promise<void>
   #transform([transformer] <Function<T>(T) => boolean>)
@@ -51,4 +51,4 @@ Forum.Models.Post
   //        ^ function
   //          ^ variable.parameter.optional
   //                       ^ type
-  //                        ^ keyword
+  //                        ^ type.definition