blob: 3d3d27f2b1a01c8f88fbcc2f9773f3096dde911f (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/* $NetBSD: lsym_while.c,v 1.6 2023/06/02 15:07:46 rillig Exp $ */
/*
* Tests for the token 'lsym_while', which represents the keyword 'while' that
* starts a 'while' loop or finishes a 'do-while' loop.
*/
//indent input
void
function(void)
{
while(cond)stmt();
do stmt();while(cond);
}
//indent end
//indent run
void
function(void)
{
while (cond)
stmt();
do
stmt();
while (cond);
}
//indent end
/*
* The keyword 'while' must only be indented if it follows a psym_do_stmt,
* otherwise it starts a new statement and must start a new line.
*/
//indent input
void
function(void)
{
{} while (0);
}
//indent end
//indent run
void
function(void)
{
{
}
while (0);
}
//indent end
|