summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-07 16:56:02 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-07 16:56:02 +0100
commitddbf20ecf6c1e359a3b9f7c5ba7e0b5f3eec2f4d (patch)
treed55897c4c002ff69b34d9e79962055912bb1eb79 /Userland/DevTools/HackStudio
parent22baa5e64fdd60b780beef785fd76ad1bd70f9bf (diff)
downloadserenity-ddbf20ecf6c1e359a3b9f7c5ba7e0b5f3eec2f4d.zip
LibSyntax+LibGUI+LibJS: Move JS syntax highlighter to LibJS
This is a little bit messy but the basic idea is: Syntax::Highlighter now has a Syntax::HighlighterClient to talk to the outside world. It mostly communicates in LibGUI primitives that are available in headers, so inlineable. GUI::TextEditor inherits from Syntax::HighlighterClient. This let us to move GUI::JSSyntaxHighlighter to JS::SyntaxHighlighter and remove LibGUI's dependency on LibJS.
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r--Userland/DevTools/HackStudio/Editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp
index eb78cf2267..c98e8f43e0 100644
--- a/Userland/DevTools/HackStudio/Editor.cpp
+++ b/Userland/DevTools/HackStudio/Editor.cpp
@@ -38,12 +38,12 @@
#include <LibGUI/Application.h>
#include <LibGUI/GMLSyntaxHighlighter.h>
#include <LibGUI/INISyntaxHighlighter.h>
-#include <LibGUI/JSSyntaxHighlighter.h>
#include <LibGUI/Label.h>
#include <LibGUI/Painter.h>
#include <LibGUI/ScrollBar.h>
#include <LibGUI/ShellSyntaxHighlighter.h>
#include <LibGUI/Window.h>
+#include <LibJS/SyntaxHighlighter.h>
#include <LibMarkdown/Document.h>
#include <LibWeb/DOM/ElementFactory.h>
#include <LibWeb/DOM/Text.h>
@@ -424,7 +424,7 @@ void Editor::set_document(GUI::TextDocument& doc)
set_syntax_highlighter(make<GUI::GMLSyntaxHighlighter>());
break;
case Language::JavaScript:
- set_syntax_highlighter(make<GUI::JSSyntaxHighlighter>());
+ set_syntax_highlighter(make<JS::SyntaxHighlighter>());
break;
case Language::Ini:
set_syntax_highlighter(make<GUI::IniSyntaxHighlighter>());