updates
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user