File indexing completed on 2024-04-28 11:20:39

0001 /*
0002     SPDX-FileCopyrightText: 2009 Milian Wolff <mail@milianw.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef QALCULATEHIGHLIGHTER_H
0008 #define QALCULATEHIGHLIGHTER_H
0009 
0010 #include "defaulthighlighter.h"
0011 
0012 class QalculateHighlighter : public Cantor::DefaultHighlighter
0013 {
0014 public:
0015     explicit QalculateHighlighter(QObject* parent);
0016     ~QalculateHighlighter() override = default;
0017 
0018 protected:
0019     void highlightBlock(const QString& text) override;
0020 
0021 private:
0022     bool isOperatorAndWhitespace(const QString &word) const;
0023 };
0024 
0025 #endif // QALCULATEHIGHLIGHTER_H