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/qmlcodeparser.cpp | |
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/qmlcodeparser.cpp')
-rw-r--r-- | tools/qdoc3/qmlcodeparser.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp index c6ace7d..329912c 100644 --- a/tools/qdoc3/qmlcodeparser.cpp +++ b/tools/qdoc3/qmlcodeparser.cpp @@ -43,9 +43,9 @@ qmlcodeparser.cpp */ -#include "parser/qmljsast_p.h" -#include "parser/qmljsastvisitor_p.h" -#include "parser/qmljsnodepool_p.h" +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsastvisitor_p.h" +#include "private/qdeclarativejsnodepool_p.h" #include "qmlcodeparser.h" #include "node.h" @@ -84,8 +84,8 @@ void QmlCodeParser::initializeParser(const Config &config) { CodeParser::initializeParser(config); - lexer = new QmlJS::Lexer(&engine); - parser = new QmlJS::Parser(&engine); + lexer = new QDeclarativeJS::Lexer(&engine); + parser = new QDeclarativeJS::Parser(&engine); } void QmlCodeParser::terminateParser() @@ -125,12 +125,12 @@ void QmlCodeParser::parseSourceFile(const Location& location, QSet<QString> metacommandsAllowed = topicCommandsAllowed + otherMetacommandsAllowed; - QmlJS::NodePool m_nodePool(filePath, &engine); + QDeclarativeJS::NodePool m_nodePool(filePath, &engine); if (parser->parse()) { - QmlJS::AST::UiProgram *ast = parser->ast(); - DocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); - QmlJS::AST::Node::accept(ast, &visitor); + QDeclarativeJS::AST::UiProgram *ast = parser->ast(); + QmlDocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); + QDeclarativeJS::AST::Node::accept(ast, &visitor); } } |