vkd3d-shader/preproc: Parse comments in #include and #line directives.

This commit is contained in:
Elizabeth Figura
2025-06-03 14:02:46 -05:00
committed by Henri Verbeet
parent 5ea697b8eb
commit 0eb5fee633
Notes: Henri Verbeet 2025-06-05 16:19:09 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1538
2 changed files with 3 additions and 3 deletions

View File

@@ -71,8 +71,8 @@ INT_SUFFIX [uUlL]{0,2}
%%
<INITIAL>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
<INITIAL>"/*" {yy_push_state(C_COMMENT, yyscanner);}
<INITIAL,INCLUDE,LINE>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
<INITIAL,INCLUDE,LINE>"/*" {yy_push_state(C_COMMENT, yyscanner);}
<CXX_COMMENT>\\{NEWLINE} {}
<CXX_COMMENT>\n {
yy_pop_state(yyscanner);

View File

@@ -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[] =