#include "bytecode.h" #include "value.h" #include "vm.h" #include "parser.h" #include int main(int argc, char **argv) { VM vm; vm_init(&vm); // If a script path is provided, parse and run it if (argc > 1) { const char *path = argv[1]; Bytecode *bc = parse_file_to_bytecode(path); if (!bc) { fprintf(stderr, "Failed to compile script: %s\n", path); return 1; } vm_run(&vm, bc); // Print captured output for user scripts vm_print_output(&vm); vm_clear_output(&vm); bytecode_free(bc); return 0; } return 0; }