Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ClangParser Class Reference

Wrapper for to let libclang assisted parsing. More...

#include <clangparser.h>

Public Member Functions

void start (const char *fileName, QStrList &filesInTranslationUnit)
 
void switchToFile (const char *fileName)
 
void finish ()
 
QCString lookup (uint line, const char *symbol)
 
void writeSources (CodeOutputInterface &ol, FileDef *fd)
 

Static Public Member Functions

static ClangParserinstance ()
 

Private Member Functions

void linkIdentifier (CodeOutputInterface &ol, FileDef *fd, uint &line, uint &column, const char *text, int tokenIndex)
 
void linkMacro (CodeOutputInterface &ol, FileDef *fd, uint &line, uint &column, const char *text)
 
void linkInclude (CodeOutputInterface &ol, FileDef *fd, uint &line, uint &column, const char *text)
 
void determineInputFilesInSameTu (QStrList &filesInTranslationUnit)
 
 ClangParser ()
 
virtual ~ClangParser ()
 

Private Attributes

Privatep
 

Static Private Attributes

static ClangParsers_instance = 0
 

Detailed Description

Wrapper for to let libclang assisted parsing.

Definition at line 11 of file clangparser.h.

Constructor & Destructor Documentation

ClangParser::ClangParser ( )
private

Definition at line 931 of file clangparser.cpp.

932 {
933 }
ClangParser::~ClangParser ( )
privatevirtual

Definition at line 935 of file clangparser.cpp.

936 {
937 }

Member Function Documentation

void ClangParser::determineInputFilesInSameTu ( QStrList filesInTranslationUnit)
private
void ClangParser::finish ( )

Finishes parsing a translation unit. Free any resources that were needed for parsing.

Definition at line 918 of file clangparser.cpp.

919 {
920 }
ClangParser * ClangParser::instance ( )
static

Returns the one and only instance of the class

Definition at line 30 of file clangparser.cpp.

31 {
32  if (!s_instance) s_instance = new ClangParser;
33  return s_instance;
34 }
static ClangParser * s_instance
Definition: clangparser.h:64
void ClangParser::linkIdentifier ( CodeOutputInterface ol,
FileDef fd,
uint line,
uint column,
const char *  text,
int  tokenIndex 
)
private
void ClangParser::linkInclude ( CodeOutputInterface ol,
FileDef fd,
uint line,
uint column,
const char *  text 
)
private
void ClangParser::linkMacro ( CodeOutputInterface ol,
FileDef fd,
uint line,
uint column,
const char *  text 
)
private
QCString ClangParser::lookup ( uint  line,
const char *  symbol 
)

Looks for symbol which should be found at line and returns a clang unique reference to the symbol.

Definition at line 922 of file clangparser.cpp.

923 {
924  return "";
925 }
void ClangParser::start ( const char *  fileName,
QStrList filesInTranslationUnit 
)

Start parsing a file.

Parameters
[in]fileNameThe name of the file to parse.
[in,out]filesInTranslationUnitOther 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.

Definition at line 910 of file clangparser.cpp.

911 {
912 }
void ClangParser::switchToFile ( const char *  fileName)

Switches to another file within the translation unit started with start().

Parameters
[in]fileNameThe name of the file to switch to.

Definition at line 914 of file clangparser.cpp.

915 {
916 }
void ClangParser::writeSources ( CodeOutputInterface ol,
FileDef fd 
)

writes the syntax highlighted source code for a file

Parameters
[out]olThe output generator list to write to.
[in]fdThe file to write sources for.

Definition at line 927 of file clangparser.cpp.

928 {
929 }

Member Data Documentation

Private* ClangParser::p
private

Definition at line 60 of file clangparser.h.

ClangParser * ClangParser::s_instance = 0
staticprivate

Definition at line 64 of file clangparser.h.


The documentation for this class was generated from the following files: