aboutsummaryrefslogtreecommitdiff
path: root/compiler/tests/parser/goto.good
blob: bef22ff7bfff02d9749f0755a0314d8dbd9b0e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

() test() {
  label start: // XXX ":" is also the namespace separator
    int a = 2;
    
    if a == 1 repeatfrom start;
    if a == 2 skipto skip;
    if a == 3 skipto skip2;
    
    int b = 4;
  label skip:
    
    if :false {
      label skip2:
        int c = 1;
        goto other;
    } else {
        int d = 2;
        goto skip2;
      label other:
    }
}