File: label.ls

package info (click to toggle)
node-livescript 1.5.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 636 kB
  • ctags: 25
  • sloc: makefile: 44; sh: 2
file content (26 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (4)
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
r = ''
:PLAIN
  :WHILE while r.length < 9
    break PLAIN if r.length > 1
    :FOR for i til 2
      r += i
      continue WHILE
  ok 0
eq r, \00

eq void, :if 1
  switch
    break _
  true

r = :outer
  :inner break inner
  break outer if false
  1
eq r, 1

compileThrows   'unknown label "a"' 1 'break a'
compileThrows 'duplicate label "b"' 2 '''
  :b
    :b break b
'''