mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Discern between signed and unsigned ints when parsing.
This commit is contained in:
committed by
Alexandre Julliard
parent
1ee9e23e00
commit
4e1bf5e163
Notes:
Alexandre Julliard
2023-11-22 22:49:11 +01:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/478
@@ -203,18 +203,30 @@ while {return KW_WHILE; }
|
||||
yylval->floatval = atof(yytext);
|
||||
return C_FLOAT;
|
||||
}
|
||||
0x[0-9a-fA-F]+[uU]? {
|
||||
0x[0-9a-fA-F]+[lL]? {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_INTEGER;
|
||||
}
|
||||
0[0-7]+[uU]? {
|
||||
0[0-7]+[lL]? {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_INTEGER;
|
||||
}
|
||||
[0-9]+[uU]? {
|
||||
[0-9]+[lL]? {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_INTEGER;
|
||||
}
|
||||
0x[0-9a-fA-F]+([uU]|[uU][lL]|[lL][uU]) {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_UNSIGNED;
|
||||
}
|
||||
0[0-7]+([uU]|[uU][lL]|[lL][uU]) {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_UNSIGNED;
|
||||
}
|
||||
[0-9]+([uU]|[uU][lL]|[lL][uU]) {
|
||||
yylval->intval = vkd3d_parse_integer(yytext);
|
||||
return C_UNSIGNED;
|
||||
}
|
||||
|
||||
{WS}+ {}
|
||||
{NEWLINE} {
|
||||
|
Reference in New Issue
Block a user