yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Tim FoleyMerge pull request #4 from tfoleyNV/escaped-newlines7fc4c40b1

master
410 B23 linesraw
1//TEST:SIMPLE:
2
3// Test support for escaped newlines in macro definitions.
4//
5// A complete lexer would handle backslash-escaped newlines
6// in every possible context (including, e.g., in the middle
7// of an identifier), but we are not going to go to such
8// lengths right now.
9
10#define FOO(x, y) 	\
11	x				\
12	y				\
13	/* */
14
15FOO(float, bar)(float a)
16{
17	FOO(return, a);
18}
19
20float foo(float x)
21{
22	return bar(x);
23}