return psi_class_entry;
}
-void psi_error_wrapper(PSI_Token *t, int type, const char *msg, ...)
+void psi_error_wrapper(void *context, PSI_Token *t, int type, const char *msg, ...)
{
va_list argv;
const char *fn = NULL;
unsigned ln = 0;
+ if (context) {
+ if (PSI_DATA(context)->flags & PSI_PARSER_SILENT) {
+ return;
+ }
+ }
+
if (t) {
fn = t->file;
ln = t->line;
{
PSI_ContextOps *ops = NULL;
zend_class_entry ce = {0};
+ unsigned flags = psi_check_env("PSI_DEBUG") ? PSI_PARSER_DEBUG : (
+ psi_check_env("PSI_SILENT") ? PSI_PARSER_SILENT : 0);
REGISTER_INI_ENTRIES();
return FAILURE;
}
- PSI_ContextInit(&PSI_G(context), ops, psi_error_wrapper);
+ PSI_ContextInit(&PSI_G(context), ops, psi_error_wrapper, flags);
PSI_ContextBuild(&PSI_G(context), PSI_G(directory));
if (psi_check_env("PSI_DUMP")) {