WIP Class Parsing

This commit is contained in:
NeeEoo
2023-03-31 18:12:50 +02:00
parent 3c81360dc2
commit 5684ca8671
7 changed files with 577 additions and 414 deletions
+3 -1
View File
@@ -57,7 +57,7 @@ enum Expr {
EFor( v : String, it : Expr, e : Expr );
EBreak;
EContinue;
EFunction( args : Array<Argument>, e : Expr, ?name : String, ?ret : CType, ?isPublic : Bool, ?isStatic : Bool);
EFunction( args : Array<Argument>, e : Expr, ?name : String, ?ret : CType, ?isPublic : Bool, ?isStatic : Bool, ?isOverride : Bool);
EReturn( ?e : Expr );
EArray( e : Expr, index : Expr );
EArrayDecl( e : Array<Expr>, ?wantedType: CType);
@@ -70,7 +70,9 @@ enum Expr {
EDoWhile( cond : Expr, e : Expr);
EMeta( name : String, args : Array<Expr>, e : Expr );
ECheckType( e : Expr, t : CType );
EImport( c : String );
EClass(name:String, fields:Array<Expr>, ?extend:String, interfaces:Array<String>);
}
typedef Argument = { name : String, ?t : CType, ?opt : Bool, ?value : Expr };