The CodeParserInterface
Class Reference
Abstract interface for code parsers. More...
Declaration
Included Headers
Derived Classes
class | CCodeParser |
class | FileCodeParser |
Generic code parser. More... | |
class | FortranCodeParser |
class | LexCodeParser |
LEX code scanner. More... | |
class | PythonCodeParser |
class | SQLCodeParser |
SQL scanner. More... | |
class | VHDLCodeParser |
class | XMLCodeParser |
XML scanner. More... | |
Public Member Functions Index
void | parseCode (OutputCodeList &codeOutList, const QCString &scopeName, const QCString &input, SrcLangExt lang, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE)=0 |
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output. More... | |
void | resetCodeParserState ()=0 |
Resets the state of the code parser. More... | |
Description
Abstract interface for code parsers.
By implementing the methods of this interface one can add a new language parser to doxygen. This interface is used for syntax highlighting, but also to extract cross references and call graphs.
Definition at line 82 of file parserintf.h.
Public Member Functions
parseCode()
|
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
- Parameters
-
[in] codeOutList interface for writing the result.
[in] scopeName Name of scope to which the code belongs.
[in] input Actual code in the form of a string
[in] lang The programming language of the code fragment.
[in] stripCodeComments signals whether or not for the code block the doxygen comments should be stripped.
[in] isExampleBlock TRUE iff the code is part of an example.
[in] exampleName Name of the example.
[in] fileDef File definition to which the code is associated.
[in] startLine Starting line in case of a code fragment.
[in] endLine Ending line of the code fragment.
[in] inlineFragment Code fragment that is to be shown inline as part of the documentation.
[in] memberDef Member definition to which the code is associated (non null in case of an inline fragment for a member).
[in] showLineNumbers if set to TRUE and also fileDef is not 0, line numbers will be added to the source fragment
[in] searchCtx context under which search data has to be stored.
[in] collectXRefs collect cross-reference relations.
Definition at line 110 of file parserintf.h.
References FALSE, parseCode and TRUE.
Referenced by DocbookDocVisitor::operator(), DocbookDocVisitor::operator(), DocbookDocVisitor::operator(), HtmlDocVisitor::operator(), HtmlDocVisitor::operator(), HtmlDocVisitor::operator(), LatexDocVisitor::operator(), LatexDocVisitor::operator(), LatexDocVisitor::operator(), ManDocVisitor::operator(), ManDocVisitor::operator(), ManDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::operator(), RTFDocVisitor::operator(), XmlDocVisitor::operator(), XmlDocVisitor::operator(), XmlDocVisitor::operator() and parseCode.
resetCodeParserState()
|
Resets the state of the code parser.
Since multiple code fragments can together form a single example, an explicit function is used to reset the code parser state.
- See Also
Definition at line 132 of file parserintf.h.
Reference resetCodeParserState.
Referenced by resetCodeParserState.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus by Doxygen 1.14.0.