Improve code quality

This commit is contained in:
Neemek 2025-03-16 21:16:12 +01:00
parent 5edad332cd
commit 3f260e7ffd
Signed by: neemek
GPG key ID: 28360A8951CD0E9B
11 changed files with 95 additions and 45 deletions

View file

@ -182,14 +182,14 @@ func TestNewLexer(t *testing.T) {
// lexer NextToken provides an error when it comes across an invalid token
func TestLexer_NextTokenErrors(t *testing.T) {
invalid_codes := []string{
invalidCodes := []string{
// Invalid tokens
"^", "@", "$&", "¨",
// Non-ending string (in same line)
"\"", "Hini minit \"mini moe", "\"this is some test\ncontent\"", "\n\"Hello world",
}
for _, code := range invalid_codes {
for _, code := range invalidCodes {
lex := NewLexer(code)
tok, err := lex.NextToken()