vkd3d-shader: Implement #else.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2020-12-15 17:13:22 -06:00
committed by Alexandre Julliard
parent 86cb863bc2
commit 78e31bff16
3 changed files with 32 additions and 0 deletions

View File

@@ -100,6 +100,8 @@ IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
for (p = yytext + 1; strchr(" \t", *p); ++p)
;
if (!strcmp(p, "else"))
return T_ELSE;
if (!strcmp(p, "endif"))
return T_ENDIF;
if (!strcmp(p, "if"))
@@ -187,6 +189,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{
switch (token)
{
case T_ELSE:
case T_ENDIF:
case T_IF:
ctx->current_directive = token;