diff options
Diffstat (limited to 'src/tools/qdoc/qmlparser/qqmljsastfwd_p.h')
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljsastfwd_p.h | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h b/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h index eae4125ab2..bfaa4401d2 100644 --- a/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h @@ -37,6 +37,7 @@ #include "qqmljsglobal_p.h" #include <QtCore/qglobal.h> +#include <QtCore/qtypeinfo.h> // // W A R N I N G @@ -53,27 +54,6 @@ QT_QML_BEGIN_NAMESPACE namespace QQmlJS { namespace AST { -class SourceLocation -{ -public: - explicit SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0) - : offset(offset), length(length), - startLine(line), startColumn(column) - { } - - bool isValid() const { return length != 0; } - - quint32 begin() const { return offset; } - quint32 end() const { return offset + length; } - -// attributes - // ### encode - quint32 offset; - quint32 length; - quint32 startLine; - quint32 startColumn; -}; - class Visitor; class Node; class ExpressionNode; @@ -176,8 +156,31 @@ class UiQualifiedId; class UiQualifiedPragmaId; class UiHeaderItemList; +class SourceLocation +{ +public: + explicit SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0) + : offset(offset), length(length), + startLine(line), startColumn(column) + { } + + bool isValid() const { return length != 0; } + + quint32 begin() const { return offset; } + quint32 end() const { return offset + length; } + +// attributes + // ### encode + quint32 offset; + quint32 length; + quint32 startLine; + quint32 startColumn; +}; + } } // namespace AST +Q_DECLARE_TYPEINFO(QQmlJS::AST::SourceLocation, Q_PRIMITIVE_TYPE); + QT_QML_END_NAMESPACE #endif |