Preprocessor: Fixed that some comments incorrectly substituted a new line instead of space. Also generally cleaned up the space-related coding.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24387 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-06 16:13:47 +00:00
parent 8e789e8d62
commit e28beee891
7 changed files with 72 additions and 37 deletions

View file

@ -263,6 +263,31 @@ double f = f1;
#line +20020
#error line should be 20021
#define VAL1 1.0
#define VAL2 2.0
#define RES2 /* test a multiline
comment in a macro definition */ (RES1 * VAL2)
#define RES1 (VAL2 / VAL1)
#define RES2 /* comment */(RES1 * VAL2)
#define /* */SUM_VALUES (RES2 + RES1)
void foo234()
{
gl_Position = vec4(SUM_VALUES);
}
// more whitespace recording tests
#define SPACE_AT_END(a,b) spaceAtEndIsOkay
#define SPACE_AT_END(a,b) spaceAtEndIsOkay // space at end
#define SPACE_AT_BEGIN(a,b)spaceAtBeginIsOkay
#define SPACE_AT_BEGIN(a,b) spaceAtBeginIsOkay
// space in middle is an error
#define SPACE_IN_MIDDLE(a,b) space +in middle
#define SPACE_IN_MIDDLE(a,b) space + in middle
#line 10000
#if 1
#else