Change result to context for clarity. Fix a bunch of stuff in builtin functions and structs.
This commit is contained in:
@@ -26,7 +26,7 @@ Codegen_State :: struct {
|
||||
|
||||
builder : String_Builder;
|
||||
|
||||
result : *Compile_Result;
|
||||
result : *Compiler_Context;
|
||||
}
|
||||
|
||||
// Codegen_Result :: struct {
|
||||
@@ -56,7 +56,7 @@ Reserved_GLSL_Words :: string.[
|
||||
""
|
||||
];
|
||||
|
||||
init_codegen_state :: (state : *Codegen_State, result : *Compile_Result, output_language : Output_Language) {
|
||||
init_codegen_state :: (state : *Codegen_State, result : *Compiler_Context, output_language : Output_Language) {
|
||||
state.current_scope = cast(Scope_Handle)1;
|
||||
state.output_language = output_language;
|
||||
init_string_builder(*state.builder);
|
||||
@@ -627,11 +627,11 @@ emit_declaration :: (state : *Codegen_State, node : *AST_Node) {
|
||||
}
|
||||
}
|
||||
|
||||
codegen :: (result : *Compile_Result) {
|
||||
codegen :: (result : *Compiler_Context) {
|
||||
codegen(result, .HLSL);
|
||||
}
|
||||
|
||||
codegen :: (result : *Compile_Result, output_language : Output_Language, allocator := temp) {
|
||||
codegen :: (result : *Compiler_Context, output_language : Output_Language, allocator := temp) {
|
||||
if result.had_error {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user