1
0
Fork 0
forked from fun/fun

Some arg Fun in Rust. (0.38.1)

This commit is contained in:
Johannes Findeisen 2026-01-29 00:53:34 +01:00
commit 543483041b
16 changed files with 167 additions and 66 deletions

View file

@ -793,6 +793,14 @@ static int emit_primary(Bytecode *bc, const char *src, size_t len, size_t *pos)
free(name);
return 1;
}
if (strcmp(name, "rust_hello_args") == 0) {
(*pos)++; /* '(' */
if (!emit_expression(bc, src, len, pos)) { parser_fail(*pos, "rust_hello_args expects (message:string)"); free(name); return 0; }
if (!consume_char(src, len, pos, ')')) { parser_fail(*pos, "Expected ')' after rust_hello_args arg"); free(name); return 0; }
bytecode_add_instruction(bc, OP_RUST_HELLO_ARGS, 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; }