Debian Codegraph @

src/app/qsci/lexers/my/QsciLexerMatlab.cpp

raw symbols SCIP
1 #include "QsciLexerMatlab.h"
2
3 QsciLexerMatlab::QsciLexerMatlab(QObject *parent) : QsciLexer(parent) {
4 }
5
6 const char *QsciLexerMatlab::keywords(int set) const {
7 if ( set == 1 )
8 return "break case catch classdef continue else elseif end for "
9 "function global if otherwise parfor persistent return "
10 "switch try while";
11 return 0;
12 }
13
14 QString QsciLexerMatlab::description(int) const {
15 // TODO : add descriptions here
16 return "";
17 }
18
19 QColor QsciLexerMatlab::defaultColor(int style) const {
20 switch (style) {
21 case Default :
22 return Qt::black;
23
24 case Comment :
25 return QColor(160, 160, 160);
26
27 case Command :
28 return QColor(80, 80, 120);
29
30 case Number :
31 return QColor(40, 160, 40);
32
33 case Keyword :
34 return QColor(40, 40, 200);
35
36 case String :
37 return QColor(200, 30, 30);
38
39 case Operator :
40 return QColor(200, 60, 200);
41
42 case Identifier :
43 return QColor(20, 40, 40);
44
45 case DoubleQuotedString :
46 return QColor(140, 30, 30);
47 }
48 return Qt::black;
49 }