1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:17:46 +00:00

LibSyntax: Move Language enum into its own files

This commit is contained in:
Sam Atkins 2023-03-08 16:10:16 +00:00 committed by Sam Atkins
parent a1f2f08764
commit 8007c103dd
5 changed files with 108 additions and 80 deletions

View file

@ -11,32 +11,15 @@
#include <LibGUI/TextDocument.h>
#include <LibGfx/Palette.h>
#include <LibSyntax/HighlighterClient.h>
#include <LibSyntax/Language.h>
namespace Syntax {
enum class Language {
CMake,
CMakeCache,
Cpp,
CSS,
GitCommit,
GML,
HTML,
INI,
JavaScript,
PlainText,
SQL,
Shell,
};
struct TextStyle {
const Gfx::Color color;
bool const bold { false };
};
StringView language_to_string(Language);
StringView common_language_extension(Language);
class Highlighter {
AK_MAKE_NONCOPYABLE(Highlighter);
AK_MAKE_NONMOVABLE(Highlighter);