Minor preprocessor fix for error message line/string numbers coming from source line, not macro line.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23576 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-10-18 03:09:37 +00:00
parent e46b087760
commit 8d8f4cc408
5 changed files with 51 additions and 4 deletions

View file

@ -84,6 +84,7 @@ namespace glslang {
class TPpToken {
public:
TPpToken() { loc.line = 0; loc.string = 0; name[0] = 0; }
static const int maxTokenLength = 1024;
TSourceLoc loc;

View file

@ -297,7 +297,7 @@ void TPpContext::RewindTokenStream(TokenStream *pTok)
*
*/
int TPpContext::ReadToken(TokenStream *pTok, TPpToken * yylvalpp)
int TPpContext::ReadToken(TokenStream *pTok, TPpToken *yylvalpp)
{
//TODO: PP: why is this different than byte_scan
@ -399,8 +399,6 @@ int TPpContext::scan_token(TPpContext* pp, TokenInputSrc *in, TPpToken * yylvalp
{
int token = pp->ReadToken(in->tokens, yylvalpp);
int (*final)(TPpContext *);
yylvalpp->loc.string = pp->currentInput->name;
yylvalpp->loc.line = pp->currentInput->line;
if (token == '\n') {
in->base.line++;
return token;