mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Implement #error.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
ba32e91aca
commit
1a326d16c6
@@ -319,6 +319,7 @@ static void free_parse_arg_names(struct parse_arg_names *args)
|
||||
%token T_NEWLINE
|
||||
|
||||
%token T_DEFINE "#define"
|
||||
%token T_ERROR "#error"
|
||||
%token T_ELIF "#elif"
|
||||
%token T_ELSE "#else"
|
||||
%token T_ENDIF "#endif"
|
||||
@@ -534,6 +535,15 @@ directive
|
||||
preproc_warning(ctx, &@$, VKD3D_SHADER_WARNING_PP_INVALID_DIRECTIVE,
|
||||
"Ignoring #endif without prior #if.");
|
||||
}
|
||||
| T_ERROR T_NEWLINE
|
||||
{
|
||||
preproc_error(ctx, &@$, VKD3D_SHADER_ERROR_PP_ERROR_DIRECTIVE, "Error directive.");
|
||||
}
|
||||
| T_ERROR T_STRING T_NEWLINE
|
||||
{
|
||||
preproc_error(ctx, &@$, VKD3D_SHADER_ERROR_PP_ERROR_DIRECTIVE, "Error directive: %s", $2);
|
||||
vkd3d_free($2);
|
||||
}
|
||||
| T_INCLUDE T_STRING T_NEWLINE
|
||||
{
|
||||
PFN_vkd3d_shader_open_include open_include = ctx->preprocess_info->pfn_open_include;
|
||||
|
Reference in New Issue
Block a user