package ast import "jinx/pkg/libs/source" type StmtKind int const ( StmtKindEmpty StmtKind = iota StmtKindUse StmtKindFnDecl StmtKindObjectDecl StmtKindVarDecl StmtKindIf 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 Modules []IdentNode Author IdentNode } type StmtFnDecl struct { Name IdentNode Args []IdentNode Body BlockNode } type StmtObjectDecl struct{} type StmtVarDecl struct { Name IdentNode Value Expr } type StmtIf struct { Cond Expr Then BlockNode Elifs []CondNode Else 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{}