mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
glcpp: Remove spurious newline generated by #version handling.
This was causing line numbering to be off by one. The newline comes from the NEWLINE token at the end of the line; there's no need to insert one.
This commit is contained in:
parent
fc63e37b97
commit
6be3a8b70a
2 changed files with 2 additions and 4 deletions
|
|
@ -88,10 +88,8 @@ HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]?
|
|||
return SPACE;
|
||||
}
|
||||
|
||||
{HASH}(version) {
|
||||
{HASH}version {
|
||||
yylval->str = talloc_strdup (yyextra, yytext);
|
||||
yylineno++;
|
||||
yycolumn = 0;
|
||||
yyextra->space_tokens = 0;
|
||||
return HASH_VERSION;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ control_line:
|
|||
talloc_free (macro);
|
||||
}
|
||||
add_builtin_define (parser, "__VERSION__", $2);
|
||||
glcpp_printf(parser->output, "#version %" PRIiMAX "\n", $2);
|
||||
glcpp_printf(parser->output, "#version %" PRIiMAX, $2);
|
||||
}
|
||||
| HASH NEWLINE
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue