From bd55ba568b301d0f764cd1ca015e84e1ae932c8b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 20 Oct 2010 21:51:03 -0700 Subject: glcpp: Return NEWLINE token for newlines inside multi-line comments. This is necessary for the main compiler to get correct line numbers. --- src/glsl/glcpp/glcpp-lex.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/glsl/glcpp') diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 8eb84ed138a..e936854cf2c 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -82,9 +82,9 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? /* Multi-line comments */ "/*" { yy_push_state(COMMENT, yyscanner); } [^*\n]* -[^*\n]*\n { yylineno++; yycolumn = 0; } +[^*\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; } "*"+[^*/\n]* -"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; } +"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; } "*"+"/" { yy_pop_state(yyscanner); if (yyextra->space_tokens) -- cgit v1.2.3