package ast import "jinx/pkg/lang/scanner/token" type ExprKind int const ( ExprKindBinary ExprKind = iota ExprKindUnary ExprKindCall ExprKindSubscription ExprKindGroup ExprKindFnLit ExprKindArrayLit ExprKindIdent ExprKindIntLit ExprKindFloatLit ExprKindStringLit ExprKindBoolLit ExprKindNullLit ExprKindThis ) type Expr[T any] struct { At token.Loc Kind ExprKind Value T } type ExprBinary struct { Left Expr[any] Op BinOp Right Expr[any] } type ExprUnary struct { Op UnOp Value Expr[any] } type ExprCall struct { Callee Expr[any] Args []Expr[any] } type ExprSubscription struct { Obj Expr[any] Key Expr[any] } type ExprGroup struct { Value Expr[any] } type ExprFnLit struct { Args []IdentNode Body BlockNode } type ExprArrayLit struct { Values []Expr[any] } type ExprIdent struct { Value IdentNode } type ExprIntLit struct { Value uint64 } type ExprFloatLit struct { Value float64 } type ExprStringLit struct { Value string } type ExprBoolLit struct { Value bool } type ExprNullLit struct{} type ExprThis struct{}