Fixed bug involving what was being set
All checks were successful
Test / build (push) Successful in 56s
All checks were successful
Test / build (push) Successful in 56s
This commit is contained in:
parent
51e35aa9a6
commit
33d04ba18d
|
@ -79,7 +79,7 @@ func (e evaluator) evalCmd(ctx context.Context, ec *evalCtx, currentPipe Object,
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return e.assignDot(ctx, ec, ast.Assign, assignVal)
|
return e.assignDot(ctx, ec, ast.Name, assignVal)
|
||||||
case (ast.Name.Arg.Ident != nil) && len(ast.Name.DotSuffix) == 0:
|
case (ast.Name.Arg.Ident != nil) && len(ast.Name.DotSuffix) == 0:
|
||||||
name := ast.Name.Arg.Ident.String()
|
name := ast.Name.Arg.Ident.String()
|
||||||
|
|
||||||
|
@ -184,12 +184,12 @@ func (e evaluator) evalDot(ctx context.Context, ec *evalCtx, n astDot) (Object,
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e evaluator) assignDot(ctx context.Context, ec *evalCtx, n *astDot, toVal Object) (Object, error) {
|
func (e evaluator) assignDot(ctx context.Context, ec *evalCtx, n astDot, toVal Object) (Object, error) {
|
||||||
if len(n.DotSuffix) == 0 {
|
if len(n.DotSuffix) == 0 {
|
||||||
return e.assignArg(ctx, ec, n.Arg, toVal)
|
return e.assignArg(ctx, ec, n.Arg, toVal)
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("TODO")
|
return nil, errors.New("TODO")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e evaluator) evalArg(ctx context.Context, ec *evalCtx, n astCmdArg) (Object, error) {
|
func (e evaluator) evalArg(ctx context.Context, ec *evalCtx, n astCmdArg) (Object, error) {
|
||||||
|
|
Loading…
Reference in a new issue