Program of `callee(arg0, arg1)` as the extractor records it. */
| 89 | |
| 90 | /* Program of `callee(arg0, arg1)` as the extractor records it. */ |
| 91 | static const char *sp_program(CBMLanguage lang, const char *callee, const char *arg0, |
| 92 | const char *arg1, const CBMImport *imports, int count, char *buf) { |
| 93 | CBMCallArg args[2] = {{.expr = arg0, .index = 0}, {.expr = arg1, .index = 1}}; |
| 94 | CBMCall call = {.callee_name = callee, .args = args, .arg_count = arg1 ? 2 : (arg0 ? 1 : 0)}; |
| 95 | const cbm_spawn_api_t *api = cbm_spawn_match(lang, callee, imports, count); |
| 96 | if (!api) { |
| 97 | return "(no match)"; |
| 98 | } |
| 99 | cbm_spawn_program(api, lang, &call, buf, CBM_SPAWN_PROGRAM_MAX); |
| 100 | return buf; |
| 101 | } |
| 102 | |
| 103 | TEST(spawn_program_rules) { |
| 104 | char b[CBM_SPAWN_PROGRAM_MAX]; |
no test coverage detected