summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodeparser.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-11-13 14:48:12 +0100
committerLiang Qi <liang.qi@qt.io>2017-11-13 14:48:12 +0100
commit2f6aaed6dc157121e95b5dd210aea8bbd1338722 (patch)
tree4899d6e15980d1bfecb462ddf637b0445877a203 /src/qdoc/cppcodeparser.h
parent07c2c0604bbfac064c8303f2a68ac54f8b7a78fc (diff)
parent995c91cd814d47e5ac3e20aca1d70d6e66f39cf2 (diff)
downloadqttools-2f6aaed6dc157121e95b5dd210aea8bbd1338722.tar.gz
Merge remote-tracking branch 'origin/wip/qdoc-clang' into dev
Conflicts: src/qdoc/cppcodeparser.h src/qdoc/location.cpp src/qdoc/qmlcodeparser.h Change-Id: I2e579ca5d83cd1c4b42acc9a07066d800cbc02cb
Diffstat (limited to 'src/qdoc/cppcodeparser.h')
-rw-r--r--src/qdoc/cppcodeparser.h57
1 files changed, 5 insertions, 52 deletions
diff --git a/src/qdoc/cppcodeparser.h b/src/qdoc/cppcodeparser.h
index c5f90f68d..a8ffba89d 100644
--- a/src/qdoc/cppcodeparser.h
+++ b/src/qdoc/cppcodeparser.h
@@ -59,17 +59,12 @@ class CppCodeParser : public CodeParser
public:
CppCodeParser();
~CppCodeParser();
- static CppCodeParser* cppParser() { return cppParser_; }
void initializeParser(const Config& config) override;
void terminateParser() override;
QString language() override;
QStringList headerFileNameFilter() override;
QStringList sourceFileNameFilter() override;
- void parseHeaderFile(const Location& location, const QString& filePath) override;
- void parseSourceFile(const Location& location, const QString& filePath) override;
- void doneParsingHeaderFiles() override;
- void doneParsingSourceFiles() override;
bool parseParameters(const QString& parameters, QVector<Parameter>& pvect, bool& isQPrivateSignal);
const Location& declLoc() const { return declLoc_; }
void setDeclLoc() { declLoc_ = location(); }
@@ -84,16 +79,14 @@ protected:
bool splitQmlPropertyGroupArg(const QString& arg,
QString& module,
QString& element,
- QString& name);
+ QString& name,
+ const Location& location);
bool splitQmlPropertyArg(const QString& arg,
QString& type,
QString& module,
QString& element,
- QString& name);
- bool splitQmlMethodArg(const QString& arg,
- QString& type,
- QString& module,
- QString& element);
+ QString& name,
+ const Location& location);
virtual void processOtherMetaCommand(const Doc& doc,
const QString& command,
const ArgLocPair& argLocPair,
@@ -113,42 +106,10 @@ protected:
bool matchCompat();
bool matchModuleQualifier(QString& name);
bool matchTemplateAngles(CodeChunk *type = 0);
- bool matchTemplateHeader();
bool matchDataType(CodeChunk *type, QString *var = 0, bool qProp = false);
bool matchParameter(QVector<Parameter>& pvect, bool& isQPrivateSignal);
- bool matchFunctionDecl(Aggregate *parent,
- QStringList *parentPathPtr,
- FunctionNode **funcPtr,
- const QString &templateStuff,
- ExtraFuncData& extra);
- bool matchBaseSpecifier(ClassNode *classe, bool isClass);
- bool matchBaseList(ClassNode *classe, bool isClass);
- bool matchClassDecl(Aggregate *parent,
- const QString &templateStuff = QString());
- bool matchNamespaceDecl(Aggregate *parent);
bool matchUsingDecl(Aggregate* parent);
- bool matchEnumItem(Aggregate *parent, EnumNode *enume);
- bool matchEnumDecl(Aggregate *parent);
- bool matchTypedefDecl(Aggregate *parent);
- bool matchProperty(Aggregate *parent);
- bool matchDeclList(Aggregate *parent);
- bool matchDocsAndStuff();
- bool makeFunctionNode(const QString &synopsis,
- QStringList *parentPathPtr,
- FunctionNode **funcPtr,
- ExtraFuncData& params);
- FunctionNode* makeFunctionNode(const Doc& doc,
- const QString& sig,
- Aggregate* parent,
- Node::NodeType type,
- bool attached,
- QString qdoctag);
- void parseQiteratorDotH(const Location &location, const QString &filePath);
- void instantiateIteratorMacro(const QString &container,
- const QString &includeFile,
- const QString &macroDef);
void createExampleFileNodes(DocumentNode *dn);
- int matchFunctionModifier();
protected:
QMap<QString, Node::NodeType> nodeTypeMap;
@@ -163,20 +124,11 @@ protected:
Location declLoc_;
private:
- QString sequentialIteratorDefinition;
- QString mutableSequentialIteratorDefinition;
- QString associativeIteratorDefinition;
- QString mutableAssociativeIteratorDefinition;
- QMap<QString, QString> sequentialIteratorClasses;
- QMap<QString, QString> mutableSequentialIteratorClasses;
- QMap<QString, QString> associativeIteratorClasses;
- QMap<QString, QString> mutableAssociativeIteratorClasses;
static QStringList exampleFiles;
static QStringList exampleDirs;
static QSet<QString> excludeDirs;
static QSet<QString> excludeFiles;
- static CppCodeParser* cppParser_;
QString exampleNameFilter;
QString exampleImageFilter;
};
@@ -205,6 +157,7 @@ protected:
#define COMMAND_REIMP Doc::alias("reimp")
#define COMMAND_RELATES Doc::alias("relates")
#define COMMAND_STARTPAGE Doc::alias("startpage")
+#define COMMAND_TYPEALIAS Doc::alias("typealias")
#define COMMAND_TYPEDEF Doc::alias("typedef")
#define COMMAND_VARIABLE Doc::alias("variable")
#define COMMAND_QMLABSTRACT Doc::alias("qmlabstract")