Moved error types to their respective packages
All checks were successful
/ test (push) Successful in 13s

This commit is contained in:
Eduard Urbach 2025-06-20 12:46:53 +02:00
parent 735246bd38
commit 6dfa7ca00d
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
19 changed files with 134 additions and 118 deletions

View file

@ -38,9 +38,9 @@ func (s *scanner) scanFile(path string, pkg string) error {
case token.EOF:
return nil
case token.Invalid:
return errors.New(&errors.InvalidCharacter{Character: tokens[i].String(file.Bytes)}, file, tokens[i].Position)
return errors.New(&InvalidCharacter{Character: tokens[i].String(file.Bytes)}, file, tokens[i].Position)
default:
return errors.New(&errors.InvalidTopLevel{Instruction: tokens[i].String(file.Bytes)}, file, tokens[i].Position)
return errors.New(&InvalidTopLevel{Instruction: tokens[i].String(file.Bytes)}, file, tokens[i].Position)
}
if err != nil {