Serialise bytecode to file
This commit is contained in:
@@ -77,6 +77,11 @@ struct _SolsTokenTypeMap SolsTokenTypeMap[] = {
|
||||
{"subtracts", STT_OP_SUBTO},
|
||||
{"multiplies", STT_OP_MULTO},
|
||||
{"divides", STT_OP_DIVTO},
|
||||
{"function", STT_KW_DEF},
|
||||
{"func", STT_KW_DEF},
|
||||
{"fn", STT_KW_DEF},
|
||||
{"ion", STT_KW_DEF},
|
||||
{"fun", STT_KW_DEF},
|
||||
{"class", STT_KW_STRUCT},
|
||||
{"compilerpleasedothisforme", STT_KW_PRAGMA}
|
||||
#endif
|
||||
|
||||
@@ -231,8 +231,13 @@ int main(int argc, char** argv) {
|
||||
break;
|
||||
}
|
||||
case SA_BYTECODE: {
|
||||
// FIXME
|
||||
//serializeProgramToFile(args.outputFile, &codegen.as.success);
|
||||
GroundState state = {
|
||||
.catches = NULL,
|
||||
.labels = NULL,
|
||||
.variables = NULL
|
||||
};
|
||||
GroundBytecode bc = Ground.New.Bytecode(&codegen.as.success, &state);
|
||||
Ground.Bytecode.save(&bc, args.outputFile);
|
||||
break;
|
||||
}
|
||||
case SA_COMPILE: {
|
||||
|
||||
Reference in New Issue
Block a user