forked from qt-creator/qt-creator
QmlJSEditor: Add completion for JS keywords and Qml reserved words.
Task-number: QTCREATORBUG-919 Reviewed-by: Roberto Raggi
This commit is contained in:
@@ -309,3 +309,13 @@ bool Scanner::isKeyword(const QString &text) const
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringList Scanner::keywords()
|
||||
{
|
||||
static QStringList words;
|
||||
if (words.isEmpty()) {
|
||||
for (const QString *word = begin(js_keywords); word != end(js_keywords); ++word)
|
||||
words.append(*word);
|
||||
}
|
||||
return words;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user