diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-12 13:04:34 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-05-12 13:04:34 (GMT) |
commit | 8dc4ff6dd22b1603f33537ff03994cc63e658768 (patch) | |
tree | 97f0e23b93d45b7917d965e6d1bb70da6c61831a /src/clangparser.h | |
parent | ebf4b3641c9149eaf4468aa8df64e1c7517e5f0c (diff) | |
download | Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.zip Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.gz Doxygen-8dc4ff6dd22b1603f33537ff03994cc63e658768.tar.bz2 |
Release-1.8.3.1-20130512
Diffstat (limited to 'src/clangparser.h')
-rw-r--r-- | src/clangparser.h | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/src/clangparser.h b/src/clangparser.h index fc56b3a..214ea50 100644 --- a/src/clangparser.h +++ b/src/clangparser.h @@ -2,29 +2,61 @@ #define CLANGPARSER_H #include <qcstring.h> +#include <qstrlist.h> -class OutputList; +class CodeOutputInterface; class FileDef; +/** @brief Wrapper for to let libclang assisted parsing. */ class ClangParser { public: + /** Returns the one and only instance of the class */ static ClangParser *instance(); - void start(const char *fileName); + + /** Start parsing a file. + * @param[in] fileName The name of the file to parse. + * @param[in,out] filesInTanslationUnit Other files that are + * part of the input and included by the file. + * The function will return a subset of the files, + * only including the onces that were actually found + * during parsing. + */ + void start(const char *fileName,QStrList &filesInTranslationUnit); + + /** Switches to another file within the translation unit started + * with start(). + * @param[in] The name of the file to switch to. + */ + void switchToFile(const char *fileName); + + /** Finishes parsing a translation unit. Free any resources that + * were needed for parsing. + */ void finish(); + + /** Looks for \a symbol which should be found at \a line and + * returns a clang unique reference to the symbol. + */ QCString lookup(uint line,const char *symbol); - void writeSources(OutputList &ol,FileDef *fd); + + /** writes the syntax highlighted source code for a file + * @param[out] ol The output generator list to write to. + * @param[in] fd The file to write sources for. + */ + void writeSources(CodeOutputInterface &ol,FileDef *fd); private: - void linkIdentifier(OutputList &ol,FileDef *fd, + void linkIdentifier(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column, const char *text,int tokenIndex); - void linkMacro(OutputList &ol,FileDef *fd, + void linkMacro(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column, const char *text); - void linkInclude(OutputList &ol,FileDef *fd, + void linkInclude(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column, const char *text); + void determineInputFilesInSameTu(QStrList &filesInTranslationUnit); class Private; Private *p; ClangParser(); |