]> git.r.bdr.sh - rbdr/api-notation.vscode/blame - README.md
Import from api-notation.tmLanguage
[rbdr/api-notation.vscode] / README.md
CommitLineData
e6c2e653 1# API Notation Syntax for Atom
45491641 2
e6c2e653
BB
3This is a grammar for api notation, a simple notation I've been using for
4annotating module APIs in specs and other documents.
5
6## Installing
7
8### From Command Line
9
10TBD
11
12## Usage
13
14Open a `.api` file, or set it as your syntax.
15
16## API Notation Reference
17
18The most recent reference as of now is in this [gist][api-reference], so
19check that to be sure. But here's a reproduction of the notation.
20
21```
22NameOfClass.WithPossibleNamespace
23 + class property
24 - instance property
25 ~> listened events (socket)
26 +> listened events (class/module)
27 -> listened events (instance)
28 <~ dispatched events (socket)
29 <+ dispatched events(class/module)
30 <- dispatched events (instance)
31 :: class method
32 # instance method
33
34Other symbols
35 => returns
36->() callback return
37[xx] optional
38<xx> data type
39
40Recommended order: class first, then sockets, then instance. Internally:
41Properties, events, methods.
42
43// Anything after two forward slashes is a comment
44```
45
46## How does it look like?
47
48Like this.
49
50![Like this.][api-example]
51
52[api-reference]: https://gist.github.com/rbdr/4694c46fcec131468e34
53[api-example]: https://i.imgur.com/63TyFMe.png