Clean up a little bit of API code. Fix an issue with missing operator. Port random semi complex shader.
This commit is contained in:
38
module.jai
38
module.jai
@@ -400,22 +400,7 @@ type_variable_to_field :: (checker : *Semantic_Checker, variable : *Type_Variabl
|
||||
return type_variable_to_field(checker.result_file.type_variables, checker.result_file.scope_stack, variable);
|
||||
}
|
||||
|
||||
compile_file :: (compiler : *Shader_Compiler, paths : []string) -> Compile_Result {
|
||||
result : Compile_Result;
|
||||
|
||||
for path : paths {
|
||||
add_file(*result, path);
|
||||
}
|
||||
|
||||
lex(*result);
|
||||
parse(*result);
|
||||
check(*result);
|
||||
codegen(*result);
|
||||
|
||||
if result.had_error {
|
||||
return result;
|
||||
}
|
||||
|
||||
generate_output_data :: (result : *Compile_Result) {
|
||||
for *file : result.files {
|
||||
if file.vertex_entry_point.node {
|
||||
file.vertex_entry_point.name = file.vertex_entry_point.node.name;
|
||||
@@ -498,6 +483,27 @@ compile_file :: (compiler : *Shader_Compiler, paths : []string) -> Compile_Resul
|
||||
file.pixel_entry_point.return_value = field;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compile_file :: (compiler : *Shader_Compiler, paths : []string) -> Compile_Result {
|
||||
result : Compile_Result;
|
||||
|
||||
for path : paths {
|
||||
add_file(*result, path);
|
||||
}
|
||||
|
||||
lex(*result);
|
||||
parse(*result);
|
||||
check(*result);
|
||||
codegen(*result);
|
||||
|
||||
if result.had_error {
|
||||
return result;
|
||||
}
|
||||
|
||||
generate_output_data(*result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user