WIP Classes

This commit is contained in:
NeeEoo
2023-03-31 20:16:30 +02:00
parent 5684ca8671
commit b7b12b6cbb
2 changed files with 21 additions and 1 deletions
+20 -1
View File
@@ -449,6 +449,9 @@ class Interp {
case EClass(name, fields, extend, interfaces):
trace(fields);
//trace(Printer.toString(fields));
for(field in fields) {
trace(Printer.toString(field));
}
case EImport(c):
if (!importEnabled)
return null;
@@ -961,9 +964,25 @@ class Interp {
}
function cnew(cl:String, args:Array<Dynamic>):Dynamic {
var cl:String = cast cl;
var c = Type.resolveClass(cl);
if (c == null)
if (c == null) {
c = resolve(cl);
//if ((c is TemplateClassGenerator)) {
// return Reflect.callMethod(c, c._hnew, args);
//}
}
return Type.createInstance(c, args);
}
}
class TemplateClass {
}
class TemplateClassGenerator {
function _hnew() {
}
}