forked from qt-creator/qt-creator
qmljs: add # as comment
Change-Id: I87a043a39eae57306bc81b3c83f7a363d53be4bd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -306,6 +306,12 @@ QList<Token> Scanner::operator()(const QString &text, int startState)
|
||||
la = text.at(index + 1);
|
||||
|
||||
switch (ch.unicode()) {
|
||||
case '#':
|
||||
if (_scanComments)
|
||||
tokens.append(Token(index, text.length() - index, Token::Comment));
|
||||
index = text.length();
|
||||
break;
|
||||
|
||||
case '/':
|
||||
if (la == QLatin1Char('/')) {
|
||||
if (_scanComments)
|
||||
|
Reference in New Issue
Block a user