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:
parent
b00865bce5
commit
fb61b3d41d
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