This commit is contained in:
2026-07-27 20:22:42 +10:00
parent 7a53105eca
commit 8b04bf39b1
10 changed files with 398 additions and 5 deletions

View File

@@ -81,8 +81,21 @@ int main(int argc, char** argv) {
break;
}
case ARGS_DISASSEMBLE: {
fprintf(stderr, "Not yet implemented");
if (args.inputFile == NULL) {
fprintf(stderr, "Please specify a bytecode file\n");
return 1;
}
GroundBytecode bc = Ground.Bytecode.load(args.inputFile);
if (Ground.Flags.error) {
fprintf(stderr, "Failed to load bytecode, printing errors...\n");
Ground.Log.printErrors();
return 1;
}
char* str = Ground.Stringify.Bytecode(&bc);
printf("%s", str);
free(str);
break;
}
case ARGS_HELP: {