psym_stmt.c revision 1.4 1 /* $NetBSD: psym_stmt.c,v 1.4 2022/04/24 10:36:37 rillig Exp $ */
2
3 /*
4 * Tests for the parser symbol psym_stmt, which represents a statement on the
5 * stack.
6 *
7 * TODO: Explain why the stack contains 'lbrace' 'stmt' instead of only 'lbrace'.
8 */
9
10 //indent input
11 #define unless(cond) if (!(cond))
12
13 void
14 function(void)
15 {
16 stmt();
17 stmt; /* probably some macro */
18
19 unless(cond)
20 stmt();
21 }
22 //indent end
23
24 /*
25 * There is no space after 'unless' since indent cannot know that it is a
26 * syntactic macro, especially not when its definition is in a header file.
27 */
28 //indent run-equals-input
29