diff options
Diffstat (limited to 'pkg/lang/ast/expr.go')
| -rw-r--r-- | pkg/lang/ast/expr.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/pkg/lang/ast/expr.go b/pkg/lang/ast/expr.go index a4d6f56..ab6578a 100644 --- a/pkg/lang/ast/expr.go +++ b/pkg/lang/ast/expr.go @@ -22,35 +22,37 @@ const ( ExprKindThis ) -type Expr[T any] struct { +type Expr ExprT[any] + +type ExprT[T any] struct { At token.Loc Kind ExprKind Value T } type ExprBinary struct { - Left Expr[any] + Left Expr Op BinOp - Right Expr[any] + Right Expr } type ExprUnary struct { Op UnOp - Value Expr[any] + Value Expr } type ExprCall struct { - Callee Expr[any] - Args []Expr[any] + Callee Expr + Args []Expr } type ExprSubscription struct { - Obj Expr[any] - Key Expr[any] + Obj Expr + Key Expr } type ExprGroup struct { - Value Expr[any] + Value Expr } type ExprFnLit struct { @@ -59,7 +61,7 @@ type ExprFnLit struct { } type ExprArrayLit struct { - Values []Expr[any] + Values []Expr } type ExprIdent struct { |
