#ifndef WORDSHIGHTLIGHTER_H
#define WORDSHIGHTLIGHTER_H

#include <QObject>
#include <QSyntaxHighlighter>
#include <libParse.h>

namespace Core {
    class AppCore;
}

namespace Enhancement {
    class HighlightFeature
    {
    public:
        virtual ~HighlightFeature() = default;

        virtual void contexBinding(Core::AppCore *app) = 0;
        virtual void renderRepeat() const = 0;
    };

    /**
     * @brief 词语语法高亮
     */
    class KeywordsHighlighter : public QSyntaxHighlighter
    {
    public:
        KeywordsHighlighter(QObject *parent = nullptr);

        void reset(Parse::Result::DocCore *base);

    private:
        Parse::Result::DocCore *parse_core;

        // QSyntaxHighlighter interface
    protected:
        virtual void highlightBlock(const QString &text) override;
    };
}


#endif // WORDSHIGHTLIGHTER_H
