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);
|
la = text.at(index + 1);
|
||||||
|
|
||||||
switch (ch.unicode()) {
|
switch (ch.unicode()) {
|
||||||
|
case '#':
|
||||||
|
if (_scanComments)
|
||||||
|
tokens.append(Token(index, text.length() - index, Token::Comment));
|
||||||
|
index = text.length();
|
||||||
|
break;
|
||||||
|
|
||||||
case '/':
|
case '/':
|
||||||
if (la == QLatin1Char('/')) {
|
if (la == QLatin1Char('/')) {
|
||||||
if (_scanComments)
|
if (_scanComments)
|
||||||
|
Reference in New Issue
Block a user