forked from qt-creator/qt-creator
Update qmljs parser to Qt 5.15 parser
* parser side support for annotations, inline components, new UiVersion and all the things included in QT 5.15 parser * SourceLocation moved from QmlJS:AST to QmlJS * Visitors now need to handle throwRecursionDepthError * BaseVisitor for visitors that want to override all visit Task-number: QTCREATORBUG-23591 Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
@@ -25,17 +25,19 @@
|
||||
|
||||
#include "qmljslexer_p.h"
|
||||
#include "qmljsengine_p.h"
|
||||
#include "qmljsmemorypool_p.h"
|
||||
#include "qmljskeywords_p.h"
|
||||
|
||||
#include "qmljs/parser/qmljsdiagnosticmessage_p.h"
|
||||
#include "qmljs/parser/qmljsmemorypool_p.h"
|
||||
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtCore/qvarlengtharray.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/QScopedValueRollback>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
|
||||
QT_END_NAMESPACE
|
||||
QT_QML_END_NAMESPACE
|
||||
|
||||
using namespace QmlJS;
|
||||
|
||||
@@ -564,7 +566,14 @@ again:
|
||||
|
||||
case ']': return T_RBRACKET;
|
||||
case '[': return T_LBRACKET;
|
||||
case '?': return T_QUESTION;
|
||||
case '?': {
|
||||
if (_char == QLatin1Char('?')) {
|
||||
scanChar();
|
||||
return T_QUESTION_QUESTION;
|
||||
}
|
||||
|
||||
return T_QUESTION;
|
||||
}
|
||||
|
||||
case '>':
|
||||
if (_char == QLatin1Char('>')) {
|
||||
@@ -696,6 +705,8 @@ again:
|
||||
case ')': return T_RPAREN;
|
||||
case '(': return T_LPAREN;
|
||||
|
||||
case '@': return T_AT;
|
||||
|
||||
case '&':
|
||||
if (_char == QLatin1Char('=')) {
|
||||
scanChar();
|
||||
|
||||
Reference in New Issue
Block a user