Skip to main content

The ClangTUParser Class Reference

Clang parser object for a single translation unit, which consists of a source file and the directly or indirectly included headers. More...

Declaration

class ClangTUParser { ... }

Included Headers

#include <src/clangparser.h>

Public Constructors Index

ClangTUParser (const ClangParser &parser, const FileDef *fd)

Public Destructor Index

~ClangTUParser ()

Public Member Functions Index

voidparse ()

Parse the file given at construction time as a translation unit This file should already be preprocessed by doxygen preprocessor at the time of calling. More...

voidswitchToFile (const FileDef *fd)

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

StringVectorfilesInSameTU () const

Returns the list of files for this translation unit. More...

std::stringlookup (uint32_t line, const char *symbol)

Looks for symbol which should be found at line. More...

voidwriteSources (OutputCodeList &ol, const FileDef *fd)

writes the syntax highlighted source code for a file More...

Private Member Functions Index

voiddetectFunctionBody (const char *s)
voidwriteLineNumber (OutputCodeList &ol, const FileDef *fd, uint32_t line, bool writeLineAnchor)
voidcodifyLines (OutputCodeList &ol, const FileDef *fd, const char *text, uint32_t &line, uint32_t &column, const char *fontClass=nullptr)
voidwriteMultiLineCodeLink (OutputCodeList &ol, const FileDef *fd, uint32_t &line, uint32_t &column, const Definition *d, const char *text)
voidlinkIdentifier (OutputCodeList &ol, const FileDef *fd, uint32_t &line, uint32_t &column, const char *text, int tokenIndex)
voidlinkMacro (OutputCodeList &ol, const FileDef *fd, uint32_t &line, uint32_t &column, const char *text)
voidlinkInclude (OutputCodeList &ol, const FileDef *fd, uint32_t &line, uint32_t &column, const char *text)
voidcodeFolding (OutputCodeList &ol, const Definition *d, uint32_t line)
voidendCodeFold (OutputCodeList &ol, uint32_t line)

Private Member Attributes Index

std::unique_ptr< Private >p

Description

Clang parser object for a single translation unit, which consists of a source file and the directly or indirectly included headers.

Definition at line 24 of file clangparser.h.

Public Constructors

ClangTUParser()

ClangTUParser::ClangTUParser (const ClangParser & parser, const FileDef * fd)

Declaration at line 27 of file clangparser.h, definition at line 978 of file clangparser.cpp.

978ClangTUParser::ClangTUParser(const ClangParser &,const FileDef *) : p(std::make_unique<Private>())
979{
980}

Reference p.

Public Destructor

~ClangTUParser()

ClangTUParser::~ClangTUParser ()
virtual

Declaration at line 29 of file clangparser.h, definition at line 982 of file clangparser.cpp.

Public Member Functions

filesInSameTU()

StringVector ClangTUParser::filesInSameTU ()

Returns the list of files for this translation unit.

Definition at line 42 of file clangparser.h.

lookup()

std::string ClangTUParser::lookup (uint32_t line, const char * symbol)

Looks for symbol which should be found at line.

returns a clang unique reference to the symbol.

Declaration at line 47 of file clangparser.h, definition at line 986 of file clangparser.cpp.

986std::string ClangTUParser::lookup(uint32_t,const char *)
987{
988 return std::string();
989}

parse()

void ClangTUParser::parse ()

Parse the file given at construction time as a translation unit This file should already be preprocessed by doxygen preprocessor at the time of calling.

Declaration at line 34 of file clangparser.h, definition at line 974 of file clangparser.cpp.

975{
976}

Referenced by parseFile.

switchToFile()

void ClangTUParser::switchToFile (const FileDef * fd)

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

Parameters
[in] fd

The file definition with the name of the file to switch to.

Declaration at line 39 of file clangparser.h, definition at line 970 of file clangparser.cpp.

971{
972}

Referenced by parseFile.

writeSources()

void ClangTUParser::writeSources (OutputCodeList & ol, const FileDef * fd)

writes the syntax highlighted source code for a file

Parameters
[out] ol

The output generator list to write to.

[in] fd

The file to write sources for.

Definition at line 53 of file clangparser.h.

Private Member Functions

codeFolding()

void ClangTUParser::codeFolding (OutputCodeList & ol, const Definition * d, uint32_t line)

Definition at line 72 of file clangparser.h.

codifyLines()

void ClangTUParser::codifyLines (OutputCodeList & ol, const FileDef * fd, const char * text, uint32_t & line, uint32_t & column, const char * fontClass=nullptr)

Definition at line 58 of file clangparser.h.

detectFunctionBody()

void ClangTUParser::detectFunctionBody (const char * s)

Definition at line 56 of file clangparser.h.

endCodeFold()

void ClangTUParser::endCodeFold (OutputCodeList & ol, uint32_t line)

Definition at line 73 of file clangparser.h.

linkIdentifier()

void ClangTUParser::linkIdentifier (OutputCodeList & ol, const FileDef * fd, uint32_t & line, uint32_t & column, const char * text, int tokenIndex)

Definition at line 63 of file clangparser.h.

linkInclude()

void ClangTUParser::linkInclude (OutputCodeList & ol, const FileDef * fd, uint32_t & line, uint32_t & column, const char * text)

Definition at line 69 of file clangparser.h.

linkMacro()

void ClangTUParser::linkMacro (OutputCodeList & ol, const FileDef * fd, uint32_t & line, uint32_t & column, const char * text)

Definition at line 66 of file clangparser.h.

writeLineNumber()

void ClangTUParser::writeLineNumber (OutputCodeList & ol, const FileDef * fd, uint32_t line, bool writeLineAnchor)

Definition at line 57 of file clangparser.h.

writeMultiLineCodeLink()

void ClangTUParser::writeMultiLineCodeLink (OutputCodeList & ol, const FileDef * fd, uint32_t & line, uint32_t & column, const Definition * d, const char * text)

Definition at line 60 of file clangparser.h.

Private Member Attributes

p

std::unique_ptr<Private> ClangTUParser::p

Definition at line 75 of file clangparser.h.

75 std::unique_ptr<Private> p;

Referenced by ClangTUParser.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.