mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glcpp: Pass #version, #extension, and #pragma directives through unchanged.
Let the main compiler's lexer/parser handle them.
This commit is contained in:
parent
04ba86a536
commit
3b73ea36c4
1 changed files with 7 additions and 0 deletions
|
|
@ -61,6 +61,13 @@ NON_STARS_THEN_STARS [^*]*[*]+
|
|||
return SPACE;
|
||||
}
|
||||
|
||||
/* glcpp doesn't handle #extension, #version, or #pragma directives.
|
||||
* Simply pass them through to the main compiler's lexer/parser. */
|
||||
{HASH}(extension|version|pragma).*\n {
|
||||
yylval.str = xtalloc_strdup (yyextra, yytext);
|
||||
return OTHER;
|
||||
}
|
||||
|
||||
{HASH}if/.*\n {
|
||||
yyextra->lexing_if = 1;
|
||||
yyextra->space_tokens = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue