Added more tests

This commit is contained in:
2025-02-05 11:11:15 +01:00
parent 8421a21c9a
commit 85568949a2
8 changed files with 20 additions and 7 deletions

View File

@ -164,7 +164,11 @@ func (s *Scanner) scanFunction(file *fs.File, tokens token.List, i int) (int, er
count := 0
err := parameters.Split(func(tokens token.List) error {
if len(tokens) < 2 {
if len(tokens) == 0 {
return errors.New(errors.MissingParameter, file, parameters[0].Position)
}
if len(tokens) == 1 {
return errors.New(errors.MissingType, file, tokens[0].End())
}