lsym_preprocessing.c revision 1.4
11.4Srillig/* $NetBSD: lsym_preprocessing.c,v 1.4 2022/04/24 09:04:12 rillig Exp $ */
21.1Srillig
31.1Srillig/*
41.1Srillig * Tests for the token lsym_preprocessing, which represents a '#' that starts
51.1Srillig * a preprocessing line.
61.1Srillig *
71.1Srillig * The whole preprocessing line is processed separately from the main source
81.1Srillig * code, without much tokenizing or parsing.
91.1Srillig */
101.1Srillig
111.1Srillig// TODO: test '#' in the middle of a non-preprocessing line
121.1Srillig// TODO: test stringify '#'
131.1Srillig// TODO: test token paste '##'
141.1Srillig
151.4Srillig//indent input
161.1Srillig// TODO: add input
171.4Srillig//indent end
181.1Srillig
191.4Srillig//indent run-equals-input
201.2Srillig
211.2Srillig
221.2Srillig/*
231.2Srillig * Whitespace in the following preprocessing directives is preserved.
241.2Srillig */
251.4Srillig//indent input
261.2Srillig#define space ' '		/* the 'define' is followed by a space */
271.2Srillig#define	tab '\t'		/* the 'define' is followed by a tab */
281.2Srillig#if   0				/* 3 spaces */
291.2Srillig#elif		0		/* 2 tabs */
301.2Srillig#elif	0	>	1	/* tabs between the tokens */
311.2Srillig#endif
321.4Srillig//indent end
331.2Srillig
341.4Srillig//indent run-equals-input
351.2Srillig
361.2Srillig// TODO: #define unfinished_string "...
371.2Srillig// TODO: #define unfinished_char '...
381.2Srillig// TODO: # 123 "file.h"
391.2Srillig// TODO: backslash-newline
401.2Srillig// TODO: block comment
411.2Srillig// TODO: line comment
42