vkd3d-shader/preproc: Lex whitespace and invalid characters in #include and #line directives.

Avoid letting them fall through to the default rule.

A syntax error will be emitted by the parser.
This commit is contained in:
Zebediah Figura 2023-05-08 12:52:10 -05:00 committed by Alexandre Julliard
parent da7670f7c8
commit ddbfd88e74
Notes: Alexandre Julliard 2023-05-09 22:25:38 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/204

View File

@ -175,9 +175,9 @@ INT_SUFFIX [uUlL]{0,2}
return T_NEWLINE;
}
<INITIAL>{WS}+ {}
<INITIAL,INCLUDE,LINE>{WS}+ {}
<INITIAL>[-()\[\]{},+!*/<>&|^?:] {return yytext[0];}
<INITIAL>. {return T_TEXT;}
<INITIAL,INCLUDE,LINE>. {return T_TEXT;}
%%