]> git.r.bdr.sh - rbdr/api-notation.tmLanguage/blame - README.md
Update README.md
[rbdr/api-notation.tmLanguage] / README.md
CommitLineData
22b2cbd2 1# API Notation Syntax for Sublime Text
190aa87e
BB
2
3This is a syntax for api notation, a simple notation I've been using for
4annotating module APIs in specs and other documents.
5
22b2cbd2
BB
6It could work for TextMate since it's a tmLanguage file. But you need to
7create a tmBundle and god knows what else. So for now, just Sublime.
8Sorry.
9
190aa87e
BB
10## Installing
11
12????
13
14## API Notation Reference
15
871e4160 16The most recent reference as of now is in this [text file][api-reference], so
190aa87e
BB
17check that to be sure. But here's a reproduction of the notation.
18
19```
20NameOfClass.WithPossibleNamespace
21 + class property
22 - instance property
23 ~> listened events (socket)
24 +> listened events (class/module)
25 -> listened events (instance)
26 <~ dispatched events (socket)
27 <+ dispatched events(class/module)
28 <- dispatched events (instance)
29 :: class method
30 # instance method
31
32Other symbols
33 => returns
34->() callback return
35[xx] optional
36<xx> data type
37
38Recommended order: class first, then sockets, then instance. Internally:
39Properties, events, methods.
40
41// Anything after two forward slashes is a comment
42```
43
44## How does it look like?
45
46Like this.
47
48![Like this.][api-example]
49
871e4160 50[api-reference]: https://gitlab.com/rbdr/txt/-/blob/main/reference/api_notation.md
2abd5aed 51[api-example]: https://i.imgur.com/ogBqI7O.png