2020-03-13 19:07:44 -03:00
|
|
|
/*
|
2022-03-04 17:26:19 -03:00
|
|
|
* Copyright (c) 2020-2022, the SerenityOS developers.
|
2020-03-13 19:07:44 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-03-13 19:07:44 -03:00
|
|
|
*/
|
|
|
|
|
|
2021-02-07 11:15:10 -03:00
|
|
|
#include <LibSyntax/Highlighter.h>
|
2020-02-07 16:07:15 -03:00
|
|
|
|
2021-02-07 11:15:10 -03:00
|
|
|
namespace Syntax {
|
2020-02-07 16:07:15 -03:00
|
|
|
|
2021-02-07 12:56:02 -03:00
|
|
|
void Highlighter::attach(HighlighterClient& client)
|
2020-02-07 16:07:15 -03:00
|
|
|
{
|
2021-02-23 16:42:32 -03:00
|
|
|
VERIFY(!m_client);
|
2021-02-07 12:56:02 -03:00
|
|
|
m_client = &client;
|
2020-02-07 16:07:15 -03:00
|
|
|
}
|
|
|
|
|
|
2021-02-07 11:15:10 -03:00
|
|
|
void Highlighter::detach()
|
2020-02-07 16:07:15 -03:00
|
|
|
{
|
2021-02-07 12:56:02 -03:00
|
|
|
m_client = nullptr;
|
2020-02-07 16:07:15 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|