xref: /netbsd-src/tests/usr.bin/indent/lsym_lparen_or_lbracket.c (revision d536862b7d93d77932ef5de7eebdc48d76921b77)
1 /* $NetBSD: lsym_lparen_or_lbracket.c,v 1.1 2021/11/18 21:19:19 rillig Exp $ */
2 /* $FreeBSD$ */
3 
4 /*
5  * Tests for the token lsym_lparen_or_lbracket, which represents a '(' or '['
6  * in these contexts:
7  *
8  * In a type name, '(' constructs a function type.
9  *
10  * In an expression, '(' starts an inner expression to override the usual
11  * operator precedence.
12  *
13  * In an expression, an identifier followed by '(' starts a function call
14  * expression.
15  *
16  * In a 'sizeof' expression, '(' is required if the argument is a type name.
17  *
18  * After one of the keywords 'for', 'if', 'switch' or 'while', the controlling
19  * expression must be enclosed in '(' and ')'.
20  *
21  * In an expression, '(' followed by a type name starts a cast expression.
22  */
23 
24 #indent input
25 // TODO: add input
26 #indent end
27 
28 #indent run-equals-input
29