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:
@@ -29,6 +29,7 @@
|
||||
#include "qmljsconstants.h"
|
||||
#include "parser/qmljsastfwd_p.h"
|
||||
#include "parser/qmljsengine_p.h"
|
||||
#include "parser/qmljsdiagnosticmessage_p.h"
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QColor)
|
||||
|
||||
@@ -38,10 +39,10 @@ QMLJS_EXPORT QColor toQColor(const QString &qmlColorString);
|
||||
QMLJS_EXPORT QString toString(AST::UiQualifiedId *qualifiedId,
|
||||
const QChar delimiter = QLatin1Char('.'));
|
||||
|
||||
QMLJS_EXPORT AST::SourceLocation locationFromRange(const AST::SourceLocation &start,
|
||||
const AST::SourceLocation &end);
|
||||
QMLJS_EXPORT SourceLocation locationFromRange(const SourceLocation &start,
|
||||
const SourceLocation &end);
|
||||
|
||||
QMLJS_EXPORT AST::SourceLocation fullLocationForQualifiedId(AST::UiQualifiedId *);
|
||||
QMLJS_EXPORT SourceLocation fullLocationForQualifiedId(AST::UiQualifiedId *);
|
||||
|
||||
QMLJS_EXPORT QString idOfObject(AST::Node *object, AST::UiScriptBinding **idBinding = nullptr);
|
||||
|
||||
@@ -51,7 +52,7 @@ QMLJS_EXPORT AST::UiQualifiedId *qualifiedTypeNameId(AST::Node *node);
|
||||
|
||||
QMLJS_EXPORT bool isValidBuiltinPropertyType(const QString &name);
|
||||
|
||||
QMLJS_EXPORT DiagnosticMessage errorMessage(const AST::SourceLocation &loc,
|
||||
QMLJS_EXPORT DiagnosticMessage errorMessage(const SourceLocation &loc,
|
||||
const QString &message);
|
||||
|
||||
QMLJS_EXPORT bool maybeModuleVersion(const QString &version);
|
||||
@@ -60,7 +61,7 @@ QMLJS_EXPORT QString modulePath(const QString &moduleImportName, const QString &
|
||||
const QStringList &importPaths);
|
||||
|
||||
template <class T>
|
||||
AST::SourceLocation locationFromRange(const T *node)
|
||||
SourceLocation locationFromRange(const T *node)
|
||||
{
|
||||
return locationFromRange(node->firstSourceLocation(), node->lastSourceLocation());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user