|
@@ -632,10 +632,16 @@ class Checker {
|
|
default:
|
|
default:
|
|
}
|
|
}
|
|
type = t;
|
|
type = t;
|
|
- TExprDef.TArray(e1, e2);
|
|
|
|
|
|
+ case TMat2:
|
|
|
|
+ type = vec2;
|
|
|
|
+ case TMat3:
|
|
|
|
+ type = vec3;
|
|
|
|
+ case TMat4, TMat3x4:
|
|
|
|
+ type = vec4;
|
|
default:
|
|
default:
|
|
error("Cannot index " + e1.t.toString() + " : should be an array", e.pos);
|
|
error("Cannot index " + e1.t.toString() + " : should be an array", e.pos);
|
|
}
|
|
}
|
|
|
|
+ TExprDef.TArray(e1, e2);
|
|
case EArrayDecl(el):
|
|
case EArrayDecl(el):
|
|
if( el.length == 0 ) error("Empty array not supported", e.pos);
|
|
if( el.length == 0 ) error("Empty array not supported", e.pos);
|
|
var el = [for( e in el ) typeExpr(e, Value)];
|
|
var el = [for( e in el ) typeExpr(e, Value)];
|