Added more tests
This commit is contained in:
@ -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())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user