From d768ea67095d3c477a1ba6ba120a10c0fed4c24c Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Tue, 3 Jun 2025 14:05:30 -0500 Subject: [PATCH] vkd3d-shader/preproc: Swap to the INITIAL state after ending a buffer. --- libs/vkd3d-shader/preproc.l | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 4e39bf659..c9c43bbbd 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -80,7 +80,11 @@ INT_SUFFIX [uUlL]{0,2} return T_NEWLINE; } "*/" {yy_pop_state(yyscanner);} -<> {yy_pop_state(yyscanner);} +<> { + yy_pop_state(yyscanner); + BEGIN(INITIAL); + yyterminate(); + } . {} \n {} @@ -196,6 +200,10 @@ INT_SUFFIX [uUlL]{0,2} BEGIN(INITIAL); return T_NEWLINE; } +<> { + BEGIN(INITIAL); + yyterminate(); + } {WS}+ {} [-()\[\]{},+!*/<>&|^?:] {return yytext[0];}