Home | History | Annotate | Line # | Download | only in indent
lsym_form_feed.c revision 1.5
      1 /* $NetBSD: lsym_form_feed.c,v 1.5 2023/05/11 09:28:53 rillig Exp $ */
      2 
      3 /*
      4  * Tests for the token lsym_form_feed, which represents a form feed, a special
      5  * kind of whitespace that is seldom used.  If it is used, it usually appears
      6  * on a line of its own, after an external-declaration, to force a page break
      7  * when printing the source code on actual paper.
      8  */
      9 
     10 //indent input
     11 void function_1(void);
     12 
     13 void function_2(void);
     15 //indent end
     16 
     17 //indent run -di0
     18 void function_1(void);
     19 
     20 /* $ XXX: The form feed is not preserved. */
     21 /* $ XXX: Why 2 empty lines? */
     22 
     23 void function_2(void);
     24 //indent end
     25 
     26 
     27 /*
     28  * Test form feed after 'if (expr)', which is handled in search_stmt.
     29  */
     30 //indent input
     31 void function(void)
     32 {
     33 	if (expr)
     34 	 /* <-- form feed */
     36 	{
     37 	}
     38 }
     39 //indent end
     40 
     41 //indent run
     42 void
     43 function(void)
     44 {
     45 	if (expr)
     46 		/* $ XXX: The form feed has disappeared. */
     47 
     48 		/* <-- form feed */
     49 	{
     50 	}
     51 }
     52 //indent end
     53