File: operator.range.styl

package info (click to toggle)
node-stylus 0.48.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,196 kB
  • ctags: 766
  • sloc: makefile: 38
file content (31 lines) | stat: -rw-r--r-- 485 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
body
  small = 1..5
  large = (1..5) (6..10)
  reversed = (5..1) (10..6)
  
  foo small
  foo large
  foo reversed
  
  foo small[0]
  foo large[0]
  foo reversed[0]
  
  foo length(small)
  foo length(large)

  foo small[length(small) - 1]
  foo large[length(large) - 1]
  foo reversed[length(reversed) - 1]
  
  foo small[-1] == 5
  foo small[123123] == null

  small[-1..-2] = 'foo'
  foo small[-1..-2] == ('foo' 'foo')

body
  start = 1
  end = 3
  foo start..end
  foo end..start