Simplification of API.
This commit is contained in:
16
Codegen.jai
16
Codegen.jai
@@ -504,6 +504,22 @@ emit_declaration :: (state : *Codegen_State, node : *AST_Node) {
|
||||
}
|
||||
}
|
||||
|
||||
codegen :: (result : *Compile_Result) {
|
||||
if result.had_error {
|
||||
return;
|
||||
}
|
||||
|
||||
for *file : result.files {
|
||||
state : Codegen_State;
|
||||
init_codegen_state(*state, file.ast_root, file.semantic_check_result, .HLSL);
|
||||
|
||||
//@Incomplete(nb): just call the codegen function for now with old result struct
|
||||
codegen_result := codegen(*state);
|
||||
|
||||
file.codegen_result_text = copy_string(codegen_result.result_text);
|
||||
}
|
||||
}
|
||||
|
||||
codegen :: (state : *Codegen_State) -> Codegen_Result {
|
||||
found_function : bool = false;
|
||||
// found_struct : bool = false;
|
||||
|
||||
Reference in New Issue
Block a user