A bit if documentation + cleanup

This commit is contained in:
Jaime Humberto Macias Bustamante
2025-06-17 23:50:00 -07:00
parent 0bd95d402a
commit 251306a3d3
4 changed files with 31 additions and 27 deletions
+2 -13
View File
@@ -1,19 +1,10 @@
package hscript;
import hscript.Interp.DeclaredVar;
import hscript.utils.UnsafeReflect;
using StringTools;
// BIG TODO: revamp this
/**
* Provides handlers for static custom class fields and instantiation.
*/
@:access(hscript.Property)
class CustomClassHandler implements IHScriptCustomConstructor implements IHScriptCustomAccessBehaviour{
public static var staticHandler = new StaticHandler();
public var __allowSetGet:Bool = true;
public var ogInterp:Interp;
public var name:String;
public var fields:Array<Expr>;
@@ -25,6 +16,8 @@ class CustomClassHandler implements IHScriptCustomConstructor implements IHScrip
private var staticInterp:Interp;
private var staticFields:Array<String> = [];
public var __allowSetGet:Bool = true;
public function new(ogInterp:Interp, name:String, fields:Array<Expr>, ?extend:String, ?interfaces:Array<String>) {
this.ogInterp = ogInterp;
this.name = name;
@@ -346,7 +339,3 @@ class TemplateClass implements IHScriptCustomBehaviour implements IHScriptCustom
return v;
}
}
final class StaticHandler {
public function new() {}
}