Clean up a little bit of API code. Fix an issue with missing operator. Port random semi complex shader.
This commit is contained in:
@@ -1448,13 +1448,13 @@ check_node :: (checker : *Semantic_Checker, node : *AST_Node) -> Type_Variable_H
|
||||
case .TOKEN_MINUS; #through;
|
||||
case .TOKEN_STAR; #through;
|
||||
case .TOKEN_SLASH; {
|
||||
if !types_compatible(checker, lhs_var, rhs_var, true) {
|
||||
if !types_compatible(checker, lhs_var, rhs_var) {
|
||||
type_mismatch(checker, node, node.children[1], lhs_var, rhs_var);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
case .TOKEN_ASSIGN; {
|
||||
if !types_compatible(checker, lhs_var, rhs_var, true) {
|
||||
if !types_compatible(checker, lhs_var, rhs_var) {
|
||||
type_mismatch(checker, node.parent, node.children[1], lhs_var, rhs_var);
|
||||
return 0;
|
||||
}
|
||||
@@ -1611,7 +1611,6 @@ types_compatible :: (checker : *Semantic_Checker, lhs : Type_Variable_Handle, rh
|
||||
case .Struct; {
|
||||
lhs_node := lhs_var.source_node;
|
||||
rhs_node := rhs_var.source_node;
|
||||
|
||||
if rhs_var.type != .Struct && !param_matching {
|
||||
if lhs_var.typename == {
|
||||
case "float2"; #through;
|
||||
@@ -1626,7 +1625,6 @@ types_compatible :: (checker : *Semantic_Checker, lhs : Type_Variable_Handle, rh
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
lhs_struct := find_symbol(checker, lhs_var.typename, xx 1);
|
||||
rhs_struct := find_symbol(checker, rhs_var.typename, xx 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user