summaryrefslogtreecommitdiff
path: root/test/scanners/cpp/elvis.in.cpp
blob: 9cdd574b5564dfe5e38dc1bd01db0a0e757dd040 (plain)
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
This?is+no:label;

// This is only one label:
label: switch (TYPE(v)) {
  case T_CLASS: case T_MODULE:
    rb_str_append(s, rb_inspect(v));
    break;
  default:
    rb_str_append(s, rb_any_to_s(v));
    break;
}
// These are two labels.
function(call);
label2: label3: a = b + c;

// Another label.
if (1) {
  label4: a = b + c;
}

// Not a label.
test(
  a?
  b:
  c
)