Home | History | Annotate | Line # | Download | only in indent
lsym_lbrace.c revision 1.4
      1  1.4  rillig /* $NetBSD: lsym_lbrace.c,v 1.4 2022/04/22 21:21:20 rillig Exp $ */
      2  1.1  rillig 
      3  1.1  rillig /*
      4  1.1  rillig  * Tests for the token lsym_lbrace, which represents a '{' in these contexts:
      5  1.1  rillig  *
      6  1.1  rillig  * In an initializer, '{' starts an inner group of initializers, usually to
      7  1.1  rillig  * initialize a nested struct, union or array.
      8  1.1  rillig  *
      9  1.1  rillig  * In a function body, '{' starts a block.
     10  1.1  rillig  *
     11  1.3  rillig  * In an expression, '(type){' starts a compound literal that is typically
     12  1.1  rillig  * used in an assignment to a struct or array.
     13  1.2  rillig  *
     14  1.2  rillig  * TODO: try to split this token into lsym_lbrace_block and lsym_lbrace_init.
     15  1.1  rillig  */
     16  1.1  rillig 
     17  1.1  rillig #indent input
     18  1.1  rillig // TODO: add input
     19  1.1  rillig #indent end
     20  1.1  rillig 
     21  1.1  rillig #indent run-equals-input
     22