lsym_word.c revision 1.5 1 /* $NetBSD: lsym_word.c,v 1.5 2022/04/24 09:04:12 rillig Exp $ */
2
3 /*
4 * Tests for the token lsym_word, which represents a constant, a string
5 * literal or an identifier.
6 *
7 * See also:
8 * lsym_funcname.c for an identifier followed by '('
9 */
10
11 // TODO: Is '"string"(' syntactically valid in any context?
12 // TODO: Is '123(' syntactically valid in any context?
13 // TODO: Would the output of the above depend on -pcs/-npcs?
14
15 //indent input
16 // TODO: add input
17 //indent end
18
19 //indent run-equals-input
20
21
22 /*
23 * Since 2019-04-04 and before NetBSD lexi.c 1.149 from 2021-11-20, the first
24 * character after a backslash continuation was always considered part of a
25 * word, no matter whether it was a word character or not.
26 */
27 //indent input
28 int var\
29 +name = 4;
30 //indent end
31
32 //indent run
33 int var + name = 4;
34 //indent end
35