Fix build.bat file.
This commit is contained in:
@@ -8,10 +8,6 @@
|
||||
// [x] Improve error reporting on mismatched overloads when types don't match, but arity does
|
||||
// [x] Improve error reporting for type mismatches in general. It seems like the expect node is not always correct.
|
||||
|
||||
#import "ncore";
|
||||
#import "Hash_Table";
|
||||
#import "String";
|
||||
|
||||
VERTEX_MAIN_FUNCTION_PREFIX :: "vertex";
|
||||
PIXEL_MAIN_FUNCTION_PREFIX :: "pixel";
|
||||
PROPERTIES_PREFIX :: "properties";
|
||||
@@ -72,6 +68,7 @@ Type_Variable :: struct {
|
||||
struct_field_parent : *AST_Node;
|
||||
|
||||
typename : string;
|
||||
is_array : bool;
|
||||
|
||||
MAX_TYPE_VARIABLE_CHILDREN :: 16;
|
||||
children : [MAX_TYPE_VARIABLE_CHILDREN]Type_Variable_Handle;
|
||||
@@ -1256,6 +1253,17 @@ create_field :: (checker : *Semantic_Checker, node : *AST_Node) -> Type_Variable
|
||||
typename : string;
|
||||
variable.type = get_type_from_identifier(checker, checker.current_scope, node, *typename);
|
||||
|
||||
variable.is_array = node.array_field;
|
||||
|
||||
if variable.is_array {
|
||||
size_node := node.children[0];
|
||||
size_var := check_node(checker, size_node);
|
||||
if h2tv(checker, size_var).type != .Int {
|
||||
//@Incomplete(niels): Type mismatch here. With integral type required message.
|
||||
print("Shiet\n");
|
||||
}
|
||||
}
|
||||
|
||||
if variable.kind == .Declaration && variable.type == .Sampler {
|
||||
variable.resource_index = checker.current_sampler_index;
|
||||
checker.current_sampler_index += 1;
|
||||
@@ -2187,3 +2195,9 @@ pretty_print_type_constraints :: (checker : *Semantic_Checker, allocator : Alloc
|
||||
|
||||
return builder_to_string(*builder,, allocator);
|
||||
}
|
||||
|
||||
#scope_module
|
||||
|
||||
#import "ncore";
|
||||
#import "Hash_Table";
|
||||
#import "String";
|
||||
|
||||
Reference in New Issue
Block a user