2020-08-24 19:38:47 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-08-24 19:38:47 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-12-28 20:16:39 +03:00
|
|
|
#include "Cell.h"
|
2021-02-07 18:56:02 +03:00
|
|
|
#include <LibJS/SyntaxHighlighter.h>
|
2020-08-24 19:38:47 +03:00
|
|
|
|
|
|
|
namespace Spreadsheet {
|
|
|
|
|
2021-02-07 18:56:02 +03:00
|
|
|
class CellSyntaxHighlighter final : public JS::SyntaxHighlighter {
|
2020-08-24 19:38:47 +03:00
|
|
|
public:
|
|
|
|
CellSyntaxHighlighter() { }
|
|
|
|
virtual ~CellSyntaxHighlighter() override;
|
|
|
|
|
2021-02-12 01:52:39 +03:00
|
|
|
virtual void rehighlight(const Palette&) override;
|
2020-12-28 20:16:39 +03:00
|
|
|
void set_cell(const Cell* cell) { m_cell = cell; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
const Cell* m_cell { nullptr };
|
2020-08-24 19:38:47 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|