QSyntaxHighlighter(parent)
{
HighlightingRule rule;
-
+/*
variable.setForeground( QColor(211, 54, 130));
builtinVariable.setForeground( QColor(220, 50, 47));
function.setForeground( QColor( 38, 139, 210));
string.setForeground( QColor(133, 153, 0));
operatorFormat.setForeground( Qt::darkRed);
comment.setForeground( Qt::gray);
+*/
+ variable.setForeground( Qt::black);
+ outputVariable.setForeground( Qt::black);
+ builtinVariable.setForeground( QColor(0x00, 0x6E, 0x28));
+ function.setForeground( QColor(0x00, 0x95, 0xFF));
+ builtinFunction.setForeground( QColor(0x00, 0x57, 0xAE));
+ number.setForeground( QColor(0xB0, 0x80, 0x00));
+ string.setForeground( QColor(0xBF, 0x03, 0x03));
+ operatorFormat.setForeground( Qt::black);
+ comment.setForeground( Qt::gray);
+
+ comment.setFontItalic(true);
+ outputVariable.setFontWeight(QFont::Black);
rule.pattern = QRegExp("0|[1-9][0-9]*");
rule.format = number;
rule.format = variable;
highlightingRules << rule;
- rule.pattern = QRegExp("\\$\\s*" + name);
+ rule.pattern = QRegExp("\\$\\s*" + name + "|" + name + "(?=\\s*\\([^)]+\\)\\s+:=)");
rule.format = function;
highlightingRules << rule;
rule.format = builtinVariable;
highlightingRules.append(rule);
}
+ {
+ QString outputVariables = "FileName|PathName";
+ rule.pattern = QRegExp("\\b(?:" + outputVariables + ")\\b");
+ rule.format = outputVariable;
+ highlightingRules << rule;
+ }
{
const QStringList functions = RenameParser::RenameEngine::registeredFunctions();