PageRenderTime 91ms CodeModel.GetById 66ms RepoModel.GetById 1ms app.codeStats 0ms

/plugins/TextEdit/Gui/Editor/QsciLexer.hpp

https://bitbucket.org/mbritanicus/newbreeze
C++ Header | 94 lines | 66 code | 23 blank | 5 comment | 0 complexity | 1aedee741fda131e967702de48dc4ace MD5 | raw file
Possible License(s): GPL-3.0
  1. /*
  2. *
  3. * QsciLexer - QScintilla Lexers
  4. *
  5. */
  6. #pragma once
  7. #include "Global.hpp"
  8. #include <Qsci/qsciscintilla.h>
  9. #include <Qsci/qscilexercustom.h>
  10. #include <Qsci/qscilexerpython.h>
  11. #include <Qsci/qscilexerhtml.h>
  12. #include <Qsci/qscilexermakefile.h>
  13. #include <Qsci/qscilexerbash.h>
  14. #include <Qsci/qscilexercpp.h>
  15. #include <Qsci/qscilexertex.h>
  16. #include <Qsci/qscilexerperl.h>
  17. #include <Qsci/qscilexeroctave.h>
  18. class QLexerDefault : public QsciLexerCustom {
  19. Q_OBJECT
  20. public:
  21. QLexerDefault( QObject *parent = 0 );
  22. const char* language() const {
  23. return "Default";
  24. };
  25. QString description( int ) const {
  26. return QString();
  27. };
  28. void styleText( int, int ) {
  29. };
  30. };
  31. class QLexerPython : public QsciLexerPython {
  32. Q_OBJECT
  33. public:
  34. QLexerPython( QObject *parent = 0 );
  35. const char* keywords( int set ) const;
  36. private:
  37. char *keywords1;
  38. char *keywords2;
  39. void populateKeywords();
  40. };
  41. class QLexerJulia : public QsciLexerOctave {
  42. Q_OBJECT
  43. public:
  44. enum{
  45. Default = 0,
  46. Comment = 1,
  47. Number = 2,
  48. DoubleQuotedString = 3,
  49. SingleQuotedString = 4,
  50. Keyword = 5,
  51. ClassName = 8,
  52. FunctionMethodName = 9,
  53. Operator = 10,
  54. Identifier = 11,
  55. CommentBlock = 12,
  56. UnclosedString = 13,
  57. HighlightedIdentifier = 14,
  58. Decorator = 15,
  59. DoubleQuotedFString = 16,
  60. SingleQuotedFString = 17,
  61. };
  62. QLexerJulia( QObject *parent = 0 );
  63. const char* language() const {
  64. return "Julia";
  65. };
  66. const char* keywords( int set ) const;
  67. private:
  68. void populateKeywords();
  69. static QString keywords1;
  70. static QString keywords2;
  71. };