1) Allow '\' before a non-newline as a token in the preprocessor, and 2) localize line-continuation to just the pp scanner.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24530 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich
2013-12-16 23:58:15 +00:00
parent 27151efa71
commit bd95819123
10 changed files with 245 additions and 78 deletions

View File

@@ -31,3 +31,23 @@ vec4 foo2(vec4 a)
/*@*/
/* *@/*/
//@
#define A int q1 = \ 1
#define B int q2 = \1
#define C int q3 = $ 1
#define D int q4 = @ 1
int a1 = \ 4; // ERROR
int a2 = @ 3; // ERROR
int a3 = $4; // ERROR
int a4 = a2\; // ERROR
A;
B;
C;
D;
# \
# \
error bad continuation