lsym_switch.c revision 1.4
11.4Srillig/* $NetBSD: lsym_switch.c,v 1.4 2023/06/10 16:43:56 rillig Exp $ */
21.1Srillig
31.1Srillig/*
41.1Srillig * Tests for the token lsym_switch, which represents the keyword 'switch' that
51.1Srillig * starts a 'switch' statement.
61.1Srillig *
71.1Srillig * See also:
81.1Srillig *	C11 6.8.4		"Selection statements"
91.1Srillig *	C11 6.8.4.2		"The 'switch' statement"
101.1Srillig */
111.1Srillig
121.4Srillig// TODO: Add systematic tests.
131.4Srillig
141.4Srillig/*
151.4Srillig * Ensure that an unfinished 'switch' statement does not eat comments.
161.4Srillig */
171.3Srillig//indent input
181.4Srillig{
191.4Srillig	switch (expr) // comment
201.4Srillig	{
211.4Srillig	}
221.4Srillig}
231.3Srillig//indent end
241.1Srillig
251.4Srillig//indent run
261.4Srillig{
271.4Srillig// $ FIXME: The '{' has moved to the comment.
281.4Srillig	switch (expr) // comment {
291.4Srillig	}
301.4Srillig}
311.4Srillig//indent end
32