]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/blobdiff - test/highlight/notation.api
Test using method
[rbdr/tree-sitter-api-notation] / test / highlight / notation.api
index b798549b12b8be25ceacfce3db1b3c4916eca6af..f161647212c80f415dac001309618c522381cf01 100644 (file)
@@ -1,15 +1,15 @@
 Forum.Models.Post
-// <- keyword
-//    ^ keyword
-//           ^ keyword
+// <- type.definition
+//    ^ type.definition
+//           ^ type.definition
   +glyphs <Array<String>>
   //<- operator
-  //^ property
-  //      ^ type
-  //       ^ keyword
-  //            ^ type
-  //             ^ keyword
-  //                    ^ type
+  //^ method
+  //      ^ punctuation
+  //       ^ type.definition
+  //            ^ punctuation
+  //             ^ type.definition
+  //                    ^ punctuation
 
   -id <UUID>
   -created_at <Date>
@@ -18,12 +18,12 @@ Forum.Models.Post
   -author <Author>
   ~>textUpdated(text <String>)
   //<- operator
-  //^ property
+  //^ method
   //           ^ function
   //            ^ parameter
-  //                 ^ type
-  //                  ^ keyword
-  //                        ^ type
+  //                 ^ punctuation
+  //                  ^ type.definition
+  //                        ^ punctuation
   //                         ^ function
   ->authorUpdated(author <Author>)
   <~textWillUpdate(text <String>)
@@ -32,17 +32,23 @@ Forum.Models.Post
   <+textWillUpdate(text <String>)
   ::getAll(parent_id <UUID>) => Promise<Array<Forum.Models.Post>> #> NotFoundError,DisplayError
   //<- operator
-  //^ property
+  //^ method
   //      ^ function
   //       ^ parameter
-  //                 ^ type
-  //                  ^ keyword
-  //                      ^ type
+  //                 ^ punctuation
+  //                  ^ type.definition
+  //                      ^ punctuation
   //                       ^ 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
+  //^ method
+  //        ^ function
+  //          ^ parameter.optional
+  //                       ^ punctuation
+  //                        ^ type.definition