package ast import "jinx/pkg/libs/source" type StmtKind int const ( StmtKindEmpty StmtKind = iota StmtKindUse StmtKindGlobal StmtKindFnDecl StmtKindTypeDecl StmtKindVarDecl StmtKindIf StmtKindForCond StmtKindForIn StmtKindTry StmtKindReturn StmtKindContinue StmtKindBreak StmtKindThrow StmtKindExpr ) type Stmt StmtT[any] type StmtT[T any] struct { At source.Loc Kind StmtKind Value T } type StmtUse struct { Globals []IdentNode Module IdentNode Author IdentNode } type StmtGlobal struct { Name IdentNode } type StmtFnDecl struct { Name IdentNode Args []IdentNode Body BlockNode } type StmtTypeDecl struct { Name IdentNode Methods []TypeMethodNode } type StmtVarDecl struct { Name IdentNode Value Expr } type StmtIf struct { Conds []CondNode } type StmtForCond struct { Cond Expr Do BlockNode } type StmtForIn struct { Name IdentNode Collection Expr Do BlockNode } type StmtTry struct { Try BlockNode CatchedName IdentNode Catch BlockNode Finally BlockNode } type StmtReturn struct { Value Expr } type StmtContinue struct{} type StmtBreak struct{} type StmtThrow struct { Value Expr } type StmtExpr struct { Value Expr } type StmtEmpty struct{}