mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-16 06:22:17 +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:
parent
b00865bce5
commit
fb61b3d41d
Notes:
sideshowbarker
2024-07-17 07:14:09 +09:00
Author: https://github.com/krkk
Commit: fb61b3d41d
Pull-request: https://github.com/SerenityOS/serenity/pull/16570
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue