mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/preproc: Parse comments in #include and #line directives.
This commit is contained in:
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
@@ -71,8 +71,8 @@ INT_SUFFIX [uUlL]{0,2}
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
<INITIAL>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
|
<INITIAL,INCLUDE,LINE>"//" {yy_push_state(CXX_COMMENT, yyscanner);}
|
||||||
<INITIAL>"/*" {yy_push_state(C_COMMENT, yyscanner);}
|
<INITIAL,INCLUDE,LINE>"/*" {yy_push_state(C_COMMENT, yyscanner);}
|
||||||
<CXX_COMMENT>\\{NEWLINE} {}
|
<CXX_COMMENT>\\{NEWLINE} {}
|
||||||
<CXX_COMMENT>\n {
|
<CXX_COMMENT>\n {
|
||||||
yy_pop_state(yyscanner);
|
yy_pop_state(yyscanner);
|
||||||
|
@@ -59,7 +59,7 @@ static void check_preprocess_(const char *file, int line, const char *source,
|
|||||||
|
|
||||||
static const char test_include_top[] =
|
static const char test_include_top[] =
|
||||||
"#include \"file1\"\n"
|
"#include \"file1\"\n"
|
||||||
"#include < file2 >\n"
|
"#include/* a comment */< file2 >//another comment\n"
|
||||||
"ARGES\n";
|
"ARGES\n";
|
||||||
|
|
||||||
static const char test_include_file1[] =
|
static const char test_include_file1[] =
|
||||||
|
Reference in New Issue
Block a user