blob: 3807cae4b7c46a73348d316febc34ed49f7cce64 [file] [log] [blame]
40 columns |
>>> Keep one blank line around case comments in switch expression.
e = switch (n) {
// comment
0 => a,
// comment
1 => b,
// comment
};
<<<
e = switch (n) {
// comment
0 => a,
// comment
1 => b,
// comment
};
>>> Line comment between cases does not force case to split after `=>`.
e = switch (n) {
0 => zero,
// comment
1 => one
};
<<<
e = switch (n) {
0 => zero,
// comment
1 => one,
};
>>> Line comment at end of case does not force cases to split.
e = switch (n) {
0 => zero, // comment
1 => one, // comment
2 => two // comment
};
<<<
e = switch (n) {
0 => zero, // comment
1 => one, // comment
2 => two, // comment
};
>>> Line comment in empty switch.
e = switch (n) {
// comment
};
<<<
e = switch (n) {
// comment
};
>>> Line comment on opening line of empty switch.
e = switch (n) { // comment
};
<<<
e = switch (n) {
// comment
};
>>> Non-inline block comment with newlines before and after.
e = switch (n) {
/* comment */
};
<<<
e = switch (n) {
/* comment */
};
>>> Non-inline block comment with trailing newline.
e = switch (n) {/* comment */
};
<<<
e = switch (n) { /* comment */ };
>>> Non-inline block comment with leading newline.
e = switch (n) {
/* comment */};
<<<
e = switch (n) { /* comment */ };
>>> Inline block comment.
e = switch (n) { /* comment */ };
<<<
e = switch (n) { /* comment */ };