Rename of files, improved for handling, add cb hints
- Rename Test to Ink as main file - Support more errors for for loops. - Add hints to cbs
This commit is contained in:
34
module.jai
34
module.jai
@@ -119,7 +119,8 @@ Constant_Buffer :: struct {
|
||||
|
||||
fields : Static_Array(Property_Field, 16);
|
||||
|
||||
hint : Field_Hint; // optional hint...
|
||||
// hints : Field_Hint; // optional hint...
|
||||
hints : [..]Field_Hint;
|
||||
|
||||
buffer_index : u32;
|
||||
}
|
||||
@@ -358,7 +359,7 @@ type_variable_to_field :: (type_variables : []Type_Variable, scope_stack : Scope
|
||||
}
|
||||
field_hint.kind = .Target;
|
||||
} else {
|
||||
field_hint.custom_hint_name = copy_string(hint.ident_value);
|
||||
field_hint.custom_hint_name = hint.ident_value;
|
||||
field_hint.kind = .Custom;
|
||||
}
|
||||
array_add(*field.hints, field_hint);
|
||||
@@ -414,21 +415,28 @@ generate_output_data :: (result : *Compile_Result) {
|
||||
}
|
||||
|
||||
cb.buffer_index = variable.resource_index;
|
||||
|
||||
for hint : variable.source_node.hint_tokens {
|
||||
field_hint : Field_Hint;
|
||||
field_hint.custom_hint_name = hint.ident_value;
|
||||
field_hint.kind = .Custom;
|
||||
array_add(*cb.hints, field_hint);
|
||||
}
|
||||
}
|
||||
|
||||
find_result := find_symbol(*result.scope_stack, result.property_name, xx 1);
|
||||
if find_result {
|
||||
property_variable := from_handle(result.type_variables, find_result.type_variable);
|
||||
find_result := find_symbol(*result.scope_stack, result.property_name, xx 1);
|
||||
if find_result {
|
||||
property_variable := from_handle(result.type_variables, find_result.type_variable);
|
||||
|
||||
for i : 0..property_variable.children.count - 1 {
|
||||
child := property_variable.children[i];
|
||||
field := type_variable_to_field(result.type_variables, result.scope_stack, from_handle(result.type_variables, child));
|
||||
prop_field : Property_Field;
|
||||
prop_field.base_field = field;
|
||||
array_add(*result.properties.fields, prop_field);
|
||||
}
|
||||
result.properties.buffer_index = property_variable.resource_index;
|
||||
for i : 0..property_variable.children.count - 1 {
|
||||
child := property_variable.children[i];
|
||||
field := type_variable_to_field(result.type_variables, result.scope_stack, from_handle(result.type_variables, child));
|
||||
prop_field : Property_Field;
|
||||
prop_field.base_field = field;
|
||||
array_add(*result.properties.fields, prop_field);
|
||||
}
|
||||
result.properties.buffer_index = property_variable.resource_index;
|
||||
}
|
||||
|
||||
|
||||
if result.pixel_entry_point.node {
|
||||
|
||||
Reference in New Issue
Block a user