+ struct psi_decl_var *call_arg;
+
+ if (cb->cb_args) {
+ if (psi_plist_count(cb->cb_args) != psi_plist_count(cb_decl->args)) {
+ data->error(data, cb->token, PSI_WARNING,
+ "Argument count of callback statement of implementation '%s'"
+ "does not match argument count of callback declaration '%s'",
+ impl->func->name, cb_decl->func->var->name);
+ return false;
+ }
+
+ for (i = 0; psi_plist_get(cb->cb_args, i, &call_arg); ++i) {
+ psi_plist_get(cb_decl->args, i, &call_arg->arg);
+ }
+ }
+ return true;
+}
+
+bool psi_let_callback_validate(struct psi_data *data, struct psi_let_callback *cb,
+ struct psi_validate_scope *scope)
+{
+ size_t i = 0;
+ struct psi_decl_type *cb_type;
+ struct psi_let_exp *exp = scope->current_let;
+ struct psi_decl_var *cb_var = exp->var;
+ struct psi_set_exp *set_exp, *parent_set = scope->current_set;