lsym_preprocessing.c revision 1.2
11.2Srillig/* $NetBSD: lsym_preprocessing.c,v 1.2 2021/11/20 16:54:17 rillig Exp $ */ 21.1Srillig/* $FreeBSD$ */ 31.1Srillig 41.1Srillig/* 51.1Srillig * Tests for the token lsym_preprocessing, which represents a '#' that starts 61.1Srillig * a preprocessing line. 71.1Srillig * 81.1Srillig * The whole preprocessing line is processed separately from the main source 91.1Srillig * code, without much tokenizing or parsing. 101.1Srillig */ 111.1Srillig 121.1Srillig// TODO: test '#' in the middle of a non-preprocessing line 131.1Srillig// TODO: test stringify '#' 141.1Srillig// TODO: test token paste '##' 151.1Srillig 161.1Srillig#indent input 171.1Srillig// TODO: add input 181.1Srillig#indent end 191.1Srillig 201.1Srillig#indent run-equals-input 211.2Srillig 221.2Srillig 231.2Srillig/* 241.2Srillig * Whitespace in the following preprocessing directives is preserved. 251.2Srillig */ 261.2Srillig#indent input 271.2Srillig#define space ' ' /* the 'define' is followed by a space */ 281.2Srillig#define tab '\t' /* the 'define' is followed by a tab */ 291.2Srillig#if 0 /* 3 spaces */ 301.2Srillig#elif 0 /* 2 tabs */ 311.2Srillig#elif 0 > 1 /* tabs between the tokens */ 321.2Srillig#endif 331.2Srillig#indent end 341.2Srillig 351.2Srillig#indent run-equals-input 361.2Srillig 371.2Srillig// TODO: #define unfinished_string "... 381.2Srillig// TODO: #define unfinished_char '... 391.2Srillig// TODO: # 123 "file.h" 401.2Srillig// TODO: backslash-newline 411.2Srillig// TODO: block comment 421.2Srillig// TODO: line comment 43