File indexing completed on 2024-05-05 11:56:01

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2011 Filipe Saraiva <filipe@kde.org>
0004 */
0005 
0006 #ifndef _SCILABHIGHLIGHTER_H
0007 #define _SCILABHIGHLIGHTER_H
0008 
0009 #include <QRegularExpression>
0010 
0011 #include "defaulthighlighter.h"
0012 #include "scilabexpression.h"
0013 
0014 class ScilabHighlighter : public Cantor::DefaultHighlighter
0015 {
0016     Q_OBJECT
0017 
0018     public:
0019         ScilabHighlighter(QObject* parent, Cantor::Session* session);
0020         ~ScilabHighlighter() override = default;
0021 
0022     protected:
0023         void highlightBlock(const QString&) override;
0024         QString nonSeparatingCharacters() const override;
0025 
0026     private:
0027         Cantor::Session* m_session;
0028         QRegularExpression commentStartExpression;
0029         QRegularExpression commentEndExpression;
0030 };
0031 
0032 #endif /* _SCILABHIGHLIGHTER_H */