glcpp: Do not remove spaces to preserve locations.

After preprocessing by glcpp all adjacent spaces were replaced by
single one and glsl parser received column-shifted shader source.
It negatively affected ast location set up and produced wrong error
messages for heavily-spaced shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Sir Anthony
2014-02-05 20:15:56 +06:00
committed by Kenneth Graunke
parent da2275cd9b
commit 6e39a8f6ec
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
return OTHER;
}
{HSPACE}+ {
{HSPACE} {
if (yyextra->space_tokens) {
return SPACE;
}
@@ -1 +1 @@
this is four tokens
this is four tokens with spaces
@@ -1,2 +1,2 @@
this is four tokens
this is four tokens with spaces
@@ -2,7 +2,7 @@
switch (1) {
case 1 + 2:
break;
case 1 + 2:
break;
}