mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/preproc: Treat CR as whitespace.
This commit is contained in:
parent
a64426edf9
commit
105ef28273
Notes:
Alexandre Julliard
2024-05-23 23:23:39 +02:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/879
@ -65,7 +65,7 @@ static void update_location(struct preproc_ctx *ctx);
|
|||||||
%s LINE
|
%s LINE
|
||||||
|
|
||||||
NEWLINE \r?\n
|
NEWLINE \r?\n
|
||||||
WS [ \t]
|
WS [ \t\r]
|
||||||
IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
|
IDENTIFIER [A-Za-z_][A-Za-z0-9_]*
|
||||||
INT_SUFFIX [uUlL]{0,2}
|
INT_SUFFIX [uUlL]{0,2}
|
||||||
|
|
||||||
|
@ -379,6 +379,18 @@ static void test_preprocess(void)
|
|||||||
"pass",
|
"pass",
|
||||||
"fail",
|
"fail",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* CRs are treated as whitespace. */
|
||||||
|
{
|
||||||
|
"#define\rKEY(a,\rb)\ra##b\r\n"
|
||||||
|
"KEY(pa,\rss)\r\n"
|
||||||
|
"#ifndef\rKEY\r\n"
|
||||||
|
"fail\r\n"
|
||||||
|
"#endif\r\n",
|
||||||
|
|
||||||
|
"pass",
|
||||||
|
"fail",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(tests); ++i)
|
for (i = 0; i < ARRAY_SIZE(tests); ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user