lsym_preprocessing.c revision 1.4
1/* $NetBSD: lsym_preprocessing.c,v 1.4 2022/04/24 09:04:12 rillig Exp $ */ 2 3/* 4 * Tests for the token lsym_preprocessing, which represents a '#' that starts 5 * a preprocessing line. 6 * 7 * The whole preprocessing line is processed separately from the main source 8 * code, without much tokenizing or parsing. 9 */ 10 11// TODO: test '#' in the middle of a non-preprocessing line 12// TODO: test stringify '#' 13// TODO: test token paste '##' 14 15//indent input 16// TODO: add input 17//indent end 18 19//indent run-equals-input 20 21 22/* 23 * Whitespace in the following preprocessing directives is preserved. 24 */ 25//indent input 26#define space ' ' /* the 'define' is followed by a space */ 27#define tab '\t' /* the 'define' is followed by a tab */ 28#if 0 /* 3 spaces */ 29#elif 0 /* 2 tabs */ 30#elif 0 > 1 /* tabs between the tokens */ 31#endif 32//indent end 33 34//indent run-equals-input 35 36// TODO: #define unfinished_string "... 37// TODO: #define unfinished_char '... 38// TODO: # 123 "file.h" 39// TODO: backslash-newline 40// TODO: block comment 41// TODO: line comment 42