xref: /netbsd-src/tests/usr.bin/indent/psym_for_exprs.c (revision 2718af68c3efc72c9769069b5c7f9ed36f6b9def)
1 /* $NetBSD: psym_for_exprs.c,v 1.2 2021/11/20 16:54:17 rillig Exp $ */
2 /* $FreeBSD$ */
3 
4 /*
5  * Tests for the parser state psym_for_exprs, which represents the state after
6  * reading the keyword 'for' and the 3 expressions, now waiting for the body
7  * of the loop.
8  */
9 
10 #indent input
11 // TODO: add input
12 #indent end
13 
14 #indent run-equals-input
15 
16 
17 /*
18  * Since C99, the first expression of a 'for' loop may be a declaration, not
19  * only an expression.
20  */
21 #indent input
22 void
23 function(void)
24 {
25 	for (int i = 0; i < 3; i++)
26 		stmt();
27 }
28 #indent end
29 
30 #indent run-equals-input
31