Changeset View
Changeset View
Standalone View
Standalone View
src/backends/scilab/scilabhighlighter.cpp
Show All 32 Lines | 28 | { | |||
---|---|---|---|---|---|
33 | addKeywords(ScilabKeywords::instance()->keywords()); | 33 | addKeywords(ScilabKeywords::instance()->keywords()); | ||
34 | 34 | | |||
35 | addRule(QLatin1String("FIXME"), commentFormat()); | 35 | addRule(QLatin1String("FIXME"), commentFormat()); | ||
36 | addRule(QLatin1String("TODO"), commentFormat()); | 36 | addRule(QLatin1String("TODO"), commentFormat()); | ||
37 | 37 | | |||
38 | addFunctions(ScilabKeywords::instance()->functions()); | 38 | addFunctions(ScilabKeywords::instance()->functions()); | ||
39 | addVariables(ScilabKeywords::instance()->variables()); | 39 | addVariables(ScilabKeywords::instance()->variables()); | ||
40 | 40 | | |||
41 | addRule(QRegExp(QLatin1String("\".*\"")), stringFormat()); | 41 | addRule(QRegExp(QLatin1String("\"[^\"]*\"")), stringFormat()); | ||
42 | addRule(QRegExp(QLatin1String("'.*'")), stringFormat()); | 42 | addRule(QRegExp(QLatin1String("'[^']*'")), stringFormat()); | ||
43 | addRule(QRegExp(QLatin1String("//[^\n]*")), commentFormat()); | 43 | addRule(QRegExp(QLatin1String("//[^\n]*")), commentFormat()); | ||
44 | 44 | | |||
45 | commentStartExpression = QRegExp(QLatin1String("/\\*")); | 45 | commentStartExpression = QRegExp(QLatin1String("/\\*")); | ||
46 | commentEndExpression = QRegExp(QLatin1String("\\*/")); | 46 | commentEndExpression = QRegExp(QLatin1String("\\*/")); | ||
47 | } | 47 | } | ||
48 | 48 | | |||
49 | ScilabHighlighter::~ScilabHighlighter() | 49 | ScilabHighlighter::~ScilabHighlighter() | ||
50 | { | 50 | { | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |