Add a basic managment of obisequenceslice to obiscript

Former-commit-id: c3d2888ebbfb237826630548b839ce93cdbf86eb
This commit is contained in:
Eric Coissac
2024-04-16 12:58:25 +02:00
parent cb35612a6c
commit df74b2b2bd
4 changed files with 110 additions and 37 deletions

View File

@ -81,6 +81,8 @@ func LuaWorker(proto *lua.FunctionProto) obiseq.SeqWorker {
switch val := s.(type) {
case *obiseq.BioSequence:
return obiseq.BioSequenceSlice{val}, err
case *obiseq.BioSequenceSlice:
return *val, err
default:
return nil, fmt.Errorf("worker function doesn't return the correct type")
}