/*
* Tests for the token lsym_rbrace, which represents a '}' in these contexts:
*
* In an initializer, '}' ends an inner group of initializers, usually to
* initialize a nested struct, union or array.
*
* In a function body, '}' ends a block.
*
* In an expression like '(type){...}', '}' ends a compound literal, which is
* typically used in an assignment to a struct or array.
*
* In macro arguments, a '}' is an ordinary character, it does not need to be
* balanced. This is in contrast to '(' and ')', which must be balanced.
*
* TODO: try to split this token into lsym_rbrace_block and lsym_rbrace_init.
*
* See also:
* lsym_lbrace.c
*/
/* Brace level in an initializer */
//indent input
void
function(void)
{
struct person p = {
.name = "Name",
.age = {{{35}}}, /* C11 6.7.9 allows this. */
};
}
//indent end
//indent run-equals-input
/* Begin of a block of statements */
//indent input
void function(void) {{{ body(); }}}
//indent end
//indent run
void
function(void)
{
{
{
body();
}
}
}
//indent end