diff options
author | David Boddie <david.boddie@nokia.com> | 2010-11-28 19:44:21 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2010-11-28 19:44:21 (GMT) |
commit | 344c3ad32bd36ad67731aa3171103a6c5e2f93e0 (patch) | |
tree | 218e2ae90de49df48f2fc7fc0f9e1ebd6571bf6e /tools/qdoc3/qmlvisitor.h | |
parent | b81081ff67d3e27e36c8165c9b0814feca1fcf15 (diff) | |
download | Qt-344c3ad32bd36ad67731aa3171103a6c5e2f93e0.zip Qt-344c3ad32bd36ad67731aa3171103a6c5e2f93e0.tar.gz Qt-344c3ad32bd36ad67731aa3171103a6c5e2f93e0.tar.bz2 |
Added the foundations of QML markup support.
Use the QtDeclarative parser instead of Qt Creator's QML parser.
Split the QML visitor into documentation and markup visitors.
The code marker used for each file is now determined from its extension.
Diffstat (limited to 'tools/qdoc3/qmlvisitor.h')
-rw-r--r-- | tools/qdoc3/qmlvisitor.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h index a830793..c7b4bda 100644 --- a/tools/qdoc3/qmlvisitor.h +++ b/tools/qdoc3/qmlvisitor.h @@ -39,36 +39,38 @@ ** ****************************************************************************/ -#ifndef DOCVISITOR_H -#define DOCVISITOR_H +#ifndef QMLVISITOR_H +#define QMLVISITOR_H #include <QString> -#include "parser/qmljsastvisitor_p.h" +#include "private/qdeclarativejsastvisitor_p.h" #include "node.h" #include "tree.h" -class DocVisitor : public QmlJS::AST::Visitor +QT_BEGIN_NAMESPACE + +class QmlDocVisitor : public QDeclarativeJS::AST::Visitor { public: - DocVisitor(const QString &filePath, const QString &code, - QmlJS::Engine *engine, Tree *tree, QSet<QString> &commands); - virtual ~DocVisitor(); + QmlDocVisitor(const QString &filePath, const QString &code, + QDeclarativeJS::Engine *engine, Tree *tree, QSet<QString> &commands); + virtual ~QmlDocVisitor(); - bool visit(QmlJS::AST::UiImportList *imports); + bool visit(QDeclarativeJS::AST::UiImportList *imports); - bool visit(QmlJS::AST::UiObjectDefinition *definition); - void endVisit(QmlJS::AST::UiObjectDefinition *definition); + bool visit(QDeclarativeJS::AST::UiObjectDefinition *definition); + void endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition); - bool visit(QmlJS::AST::UiPublicMember *member); - void endVisit(QmlJS::AST::UiPublicMember *definition); + bool visit(QDeclarativeJS::AST::UiPublicMember *member); + void endVisit(QDeclarativeJS::AST::UiPublicMember *definition); - bool visit(QmlJS::AST::IdentifierPropertyName *idproperty); + bool visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty); private: - QmlJS::AST::SourceLocation precedingComment(unsigned offset) const; - void applyDocumentation(QmlJS::AST::SourceLocation location, Node *node); + QDeclarativeJS::AST::SourceLocation precedingComment(unsigned offset) const; + void applyDocumentation(QDeclarativeJS::AST::SourceLocation location, Node *node); - QmlJS::Engine *engine; + QDeclarativeJS::Engine *engine; quint32 lastEndOffset; QString filePath; QString name; @@ -79,4 +81,6 @@ private: InnerNode *current; }; +QT_END_NAMESPACE + #endif |