diff --git a/libs/vkd3d-shader/preproc.l b/libs/vkd3d-shader/preproc.l index 4a8d0fdda..4e39bf659 100644 --- a/libs/vkd3d-shader/preproc.l +++ b/libs/vkd3d-shader/preproc.l @@ -71,8 +71,8 @@ INT_SUFFIX [uUlL]{0,2} %% -"//" {yy_push_state(CXX_COMMENT, yyscanner);} -"/*" {yy_push_state(C_COMMENT, yyscanner);} +"//" {yy_push_state(CXX_COMMENT, yyscanner);} +"/*" {yy_push_state(C_COMMENT, yyscanner);} \\{NEWLINE} {} \n { yy_pop_state(yyscanner); diff --git a/tests/hlsl_d3d12.c b/tests/hlsl_d3d12.c index 268856b03..6d3569cf4 100644 --- a/tests/hlsl_d3d12.c +++ b/tests/hlsl_d3d12.c @@ -59,7 +59,7 @@ static void check_preprocess_(const char *file, int line, const char *source, static const char test_include_top[] = "#include \"file1\"\n" - "#include < file2 >\n" + "#include/* a comment */< file2 >//another comment\n" "ARGES\n"; static const char test_include_file1[] =