]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/blobdiff - test/highlight/notation.api
Define identifiers as type definitions
[rbdr/tree-sitter-api-notation] / test / highlight / notation.api
index b798549b12b8be25ceacfce3db1b3c4916eca6af..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>
@@ -20,9 +20,9 @@ Forum.Models.Post
   //<- operator
   //^ property
   //           ^ function
-  //            ^ parameter
+  //            ^ variable.parameter
   //                 ^ type
-  //                  ^ keyword
+  //                  ^ type.definition
   //                        ^ type
   //                         ^ function
   ->authorUpdated(author <Author>)
@@ -34,15 +34,21 @@ Forum.Models.Post
   //<- operator
   //^ property
   //      ^ function
-  //       ^ parameter
+  //       ^ 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>)
+  #transform([transformer] <Function<T>(T) => boolean>)
+  //<- operator
+  //^ property
+  //        ^ function
+  //          ^ variable.parameter.optional
+  //                       ^ type
+  //                        ^ type.definition