mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
slang: Report syntax parser errors.
This commit is contained in:
parent
99c89ebdb0
commit
3f147c71ed
1 changed files with 10 additions and 5 deletions
|
|
@ -2722,17 +2722,22 @@ compile_with_grammar(const char *source,
|
|||
}
|
||||
|
||||
/* Finally check the syntax and generate its binary representation. */
|
||||
result = sl_cl_compile(context, tokens, shader_type, &prod, &size);
|
||||
result = sl_cl_compile(context,
|
||||
tokens,
|
||||
shader_type,
|
||||
parsing_builtin,
|
||||
&prod,
|
||||
&size,
|
||||
errmsg,
|
||||
sizeof(errmsg));
|
||||
|
||||
sl_pp_context_destroy(context);
|
||||
free(tokens);
|
||||
|
||||
if (result) {
|
||||
/*char buf[1024];
|
||||
GLint pos;*/
|
||||
/*GLint pos;*/
|
||||
|
||||
/*slang_info_log_error(infolog, buf);*/
|
||||
slang_info_log_error(infolog, "Syntax error.");
|
||||
slang_info_log_error(infolog, errmsg);
|
||||
/* syntax error (possibly in library code) */
|
||||
#if 0
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue