Finished working on playground and added a CI/CD step

This commit is contained in:
Leon Mika 2024-04-26 10:31:41 +10:00
parent fdc480262d
commit 1d7a076f63
8 changed files with 91 additions and 23 deletions

View file

@ -268,6 +268,12 @@ func (ia invocationArgs) invokableArg(i int) (invokable, error) {
switch v := ia.args[i].(type) {
case invokable:
return v, nil
case strObject:
iv := ia.ec.lookupInvokable(string(v))
if iv == nil {
return nil, errors.New("'" + string(v) + "' is not invokable")
}
return iv, nil
}
return nil, errors.New("expected an invokable arg")
}