Skip to content

Commit

Permalink
XXX
Browse files Browse the repository at this point in the history
  • Loading branch information
mptre committed Aug 14, 2024
1 parent f00c5c3 commit a1e555d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions match.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <stdarg.h>
#include <string.h>

#include <err.h>
#include <stdio.h>

#include "lexer.h"

static void
Expand All @@ -19,12 +22,15 @@ match_func_init(struct match_func *mf)
for (i = 0; mc_functions[i].expr != NULL; i++) {
const struct match_func *candidate = &mc_functions[i];

warnx("XXX %s: candidate '%s'", __func__, candidate->expr);

if (strcmp(mf->expr, candidate->expr) == 0) {
mf->callback = candidate->callback;
return;
}
}

warnx("XXX %s: no callback for '%s'", __func__, mf->expr);
__builtin_trap(); /* UNREACHABLE */
}

Expand Down

0 comments on commit a1e555d

Please sign in to comment.