1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

LibSyntax: Remove default switch case in language_to_string()

This way we can get a compiler error about unhandled new language cases,
instead of a possible crash when running a program.

Also added a missing case to make it build now.
This commit is contained in:
Karol Kosek 2022-12-19 19:18:43 +01:00 committed by Tim Flynn
parent b00865bce5
commit fb61b3d41d

View file

@ -155,13 +155,14 @@ StringView language_to_string(Language language)
return "INI"sv;
case Language::JavaScript:
return "JavaScript"sv;
case Language::PlainText:
return "Plain Text"sv;
case Language::Shell:
return "Shell"sv;
case Language::SQL:
return "SQL"sv;
default:
VERIFY_NOT_REACHED();
}
VERIFY_NOT_REACHED();
}
}