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