some fixes & stuff

This commit is contained in:
Yoshman29
2023-04-19 01:46:48 +02:00
parent ddaa4d1741
commit 2e28f863f3
3 changed files with 58 additions and 46 deletions
+7 -3
View File
@@ -34,8 +34,9 @@ class UsingHandler {
var metas = cl.meta.get();
var shadowClass = macro class {
};
shadowClass.kind = TDClass();
shadowClass.params = switch(cl.params.length) {
case 0:
null;
@@ -52,6 +53,9 @@ class UsingHandler {
};
shadowClass.name = '${cl.name.substr(0, cl.name.length - 6)}_HSC';
var imports = Context.getLocalImports().copy();
ClassExtendMacro.setupMetas(shadowClass, imports);
for(f in fields)
switch(f.kind) {
case FFun(fun):
@@ -85,13 +89,13 @@ class UsingHandler {
doc: f.doc,
access: [APublic, AStatic]
}
shadowClass.fields.push(field);
}
default:
}
Context.defineModule(cl.module, [shadowClass], Context.getLocalImports());
Context.defineModule(cl.module + "_HSC", [shadowClass], imports);
}
return fields;