Commit 3e2b16ff authored by jhammen's avatar jhammen
Browse files

add import as keyword to syntax highlighter

parent d2588c82
......@@ -40,12 +40,12 @@ SynHighlighter::SynHighlighter(QTextDocument *parent)
// keywords
format.setForeground(QColor("#958515"));
QStringList keywords = {"base", "break", "case", "catch", "class", "clone",
"continue", "const", "default", "delete", "else", "enum",
"extends", "for", "foreach", "function", "if", "in",
"local", "null", "resume", "return", "switch", "this",
"throw", "try", "typeof", "while", "yield", "constructor",
"instanceof", "true", "false", "static", "__LINE__", "__FILE__"};
QStringList keywords = {
"base", "break", "case", "catch", "class", "clone", "continue", "const",
"default", "delete", "else", "enum", "extends", "for", "foreach", "function",
"if", "import", "in", "local", "null", "resume", "return", "switch",
"this", "throw", "try", "typeof", "while", "yield", "constructor", "instanceof",
"true", "false", "static", "__LINE__", "__FILE__"};
foreach (const QString &word, keywords) { addRule(QRegExp("\\b" + word + "\\b"), format); }
// 1 line string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment