]> code.delx.au - gnu-emacs-elpa/blob - packages/coffee-mode/examples/imenu.coffee
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / coffee-mode / examples / imenu.coffee
1 # Testing imenu
2 regexp = /asdas/
3 two = 4 / 2
4
5 minus = (x, y) -> x - y
6
7 String::length = -> 10
8
9 class Person
10 print: ->
11 print 'My name is ' + this.name + '.'
12
13 app =
14 window: {width: 200, height: 200}
15 para: 'Welcome.'
16 button: 'OK'
17
18 block = ->
19 print('potion')
20
21 Please = {}
22 Please.print = (word) ->
23 print(word)
24
25 HomePage::get = (url) ->
26 session: url.query.session if url.query?
27
28 class Policeman extends Person
29 constructor: (rank) ->
30 @rank: rank
31
32 print: ->
33 print 'My name is ' + this.name + " and I'm a " + this.rank + '.'