Preprocessor: Rationalize, simplify, and correct the stack of input sources and their tokenization. This included
- consistently dealing with EOF and its effect on error recovery (bug 11444, #1) - turning a simulated OO hierarchy of function pointers and typecasting into a real C++ class hierarchy - correctly handling '\' everywhere, in all classes of tokens, as a layer before preprocessing itself - conditionally handling '\n' in macro expansion input, depending on whether it is in a macro expression or not - delete some unused "memory cleanup" code git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24626 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -54,4 +54,95 @@ D;
|
||||
# \
|
||||
error good continuation
|
||||
|
||||
#define AA a \ b
|
||||
#define AA1 a \ b
|
||||
#define AA2 a \\ b
|
||||
#define AA3 a \\\ b
|
||||
#define AA4 a \\\\ b
|
||||
|
||||
// anoetuh nonaetu \\\\\\
|
||||
still in comment
|
||||
|
||||
int abdece = 10;
|
||||
int aoeuntaoehu = abd\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
\
|
||||
ece;
|
||||
|
||||
float funkyf = \
|
||||
.\
|
||||
1\
|
||||
2\
|
||||
3\
|
||||
e\
|
||||
+\
|
||||
1\
|
||||
7\
|
||||
;\
|
||||
int funkyh\
|
||||
=\
|
||||
0\
|
||||
x\
|
||||
f\
|
||||
4\
|
||||
;
|
||||
int funkyo =\
|
||||
0\
|
||||
4\
|
||||
2\
|
||||
;
|
||||
int c = \
|
||||
11;
|
||||
int d = 1\
|
||||
2;
|
||||
|
||||
#define FOOM(a,b) a + b
|
||||
|
||||
#if FO\
|
||||
OM(2\
|
||||
,\
|
||||
3)
|
||||
int bar103 = 17;
|
||||
#endif
|
||||
|
||||
// ERROR
|
||||
#if FOOM(2,
|
||||
3)
|
||||
int bar104 = 19;
|
||||
#endif
|
||||
|
||||
// ERROR
|
||||
#if FOOM(
|
||||
2,3)
|
||||
int bar105 = 19;
|
||||
#endif
|
||||
|
||||
int bar106 = FOOM(5,7);
|
||||
int bar107 = FOOM // okay
|
||||
(
|
||||
2
|
||||
,
|
||||
3
|
||||
)
|
||||
;
|
||||
|
||||
void foo203209409()
|
||||
{
|
||||
bar107 \
|
||||
+= 37;
|
||||
bar107 *\
|
||||
= 38;
|
||||
bar107 /=\
|
||||
39;
|
||||
bar107 +\
|
||||
41;
|
||||
}
|
||||
|
||||
void foo230920394()
|
||||
{
|
||||
// syntax error
|
||||
bar107 +\
|
||||
= 42;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user