1
0
Fork 0
forked from fun/fun

Added Rust support to the Fun core. (0.38.0)

This commit is contained in:
Johannes Findeisen 2026-01-27 04:26:54 +01:00
commit 149e135318
12 changed files with 299 additions and 1 deletions

View file

@ -786,6 +786,13 @@ static int emit_primary(Bytecode *bc, const char *src, size_t len, size_t *pos)
free(name);
return 1;
}
if (strcmp(name, "rust_hello") == 0) {
(*pos)++; /* '(' */
if (!consume_char(src, len, pos, ')')) { parser_fail(*pos, "rust_hello expects ()"); free(name); return 0; }
bytecode_add_instruction(bc, OP_RUST_HELLO, 0);
free(name);
return 1;
}
if (strcmp(name, "os_list_dir") == 0) {
(*pos)++; /* '(' */
if (!emit_expression(bc, src, len, pos)) { parser_fail(*pos, "os_list_dir expects (path)"); free(name); return 0; }