Implemented Value interface
This commit is contained in:
@ -11,16 +11,15 @@ func (f *Function) EvaluateCall(expr *expression.Expression) (eval.Value, error)
|
||||
types, err := f.CompileCall(expr)
|
||||
|
||||
if err != nil {
|
||||
return eval.Value{}, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(types) == 0 {
|
||||
return eval.Value{}, errors.New(errors.UntypedExpression, f.File, expr.Token.Position)
|
||||
return nil, errors.New(errors.UntypedExpression, f.File, expr.Token.Position)
|
||||
}
|
||||
|
||||
value := eval.Value{
|
||||
Kind: eval.Register,
|
||||
Type: types[0],
|
||||
value := eval.Register{
|
||||
Typ: types[0],
|
||||
Register: f.CPU.Output[0],
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user