<commit_before>#ifndef SYNTAXHIGHLIGHTER_H
#define SYNTAXHIGHLIGHTER_H

#include <QObject>
#include <QString>
#include <QTextCharFormat>
#include <QColor>
#include <QFont>
#include <QList>
#include <QTextLayout>

class TextEdit;
class TextLayout;
class TextDocument;
class SyntaxHighlighter : public QObject
{
    Q_OBJECT
public:
    SyntaxHighlighter(QObject *parent);
    SyntaxHighlighter(TextEdit *parent);
    ~SyntaxHighlighter();
    void setTextEdit(TextEdit *doc);
    TextEdit *textEdit() const;
    TextDocument *document() const;
public Q_SLOTS:
    void rehighlight();
protected:
    virtual void highlightBlock(const QString &text) = 0;
    QString currentBlock() const { return d->currentBlock; }
    void setFormat(int start, int count, const QTextCharFormat &format);
    void setFormat(int start, int count, const QColor &color);
    void setFormat(int start, int count, const QFont &font);
    void setBlockFormat(const QTextBlockFormat &format);
    QTextCharFormat format(int pos) const;
    int previousBlockState() const;
    int currentBlockState() const;
    void setCurrentBlockState(int s);
    int currentBlockPosition() const;
private:
    struct Private {<commit_msg>default parent for highlighters<commit_after>#ifndef SYNTAXHIGHLIGHTER_H
#define SYNTAXHIGHLIGHTER_H

#include <QObject>
#include <QString>
#include <QTextCharFormat>
#include <QColor>
#include <QFont>
#include <QList>
#include <QTextLayout>

class TextEdit;
class TextLayout;
class TextDocument;
class SyntaxHighlighter : public QObject
{
    Q_OBJECT
public:
    SyntaxHighlighter(QObject *parent = 0);
    SyntaxHighlighter(TextEdit *parent);
    ~SyntaxHighlighter();
    void setTextEdit(TextEdit *doc);
    TextEdit *textEdit() const;
    TextDocument *document() const;
public Q_SLOTS:
    void rehighlight();
protected:
    virtual void highlightBlock(const QString &text) = 0;
    QString currentBlock() const { return d->currentBlock; }
    void setFormat(int start, int count, const QTextCharFormat &format);
    void setFormat(int start, int count, const QColor &color);
    void setFormat(int start, int count, const QFont &font);
    void setBlockFormat(const QTextBlockFormat &format);
    QTextCharFormat format(int pos) const;
    int previousBlockState() const;
    int currentBlockState() const;
    void setCurrentBlockState(int s);
    int currentBlockPosition() const;
private:
    struct Private {
{'fraction_non_alphanumeric': 0.09305210918114144, 'fraction_numerical': 0.0012406947890818859, 'mean_word_length': 5.108585858585859, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1160333', 'n_tokens_mistral': 747, 'n_tokens_neox': 735, 'n_words': 218}