feat: rename repr to expr

This commit is contained in:
2026-02-07 10:25:20 -05:00
parent bbe027e9f4
commit a790a293cf
9 changed files with 54 additions and 50 deletions

View File

@@ -8,7 +8,7 @@ import (
)
type Codec interface {
codec.Codec[Repr]
codec.Codec[Expr]
InType() string
}
@@ -18,16 +18,16 @@ type convertedCodec[T any] struct {
inType string
}
func (c convertedCodec[T]) Decode(s string) (Repr, error) {
func (c convertedCodec[T]) Decode(s string) (Expr, error) {
t, err := c.codec.Decode(s)
if err != nil {
return nil, err
}
return NewRepr(c.inType, t), nil
return NewExpr(c.inType, t), nil
}
func (c convertedCodec[T]) Encode(r Repr) (string, error) {
func (c convertedCodec[T]) Encode(r Expr) (string, error) {
t, ok := r.Data().(T)
if !ok {
dataType := reflect.TypeOf(r.Data())