BumbleDocGen / Technical description of the project / Parser
Most often, we need ProjectParser in order to get a list of entities for documentation. But this is not the only use of this tool. The result of the parser's work (a collection of entities) can be used to programmatically analyze the project and perform any operations based on this analysis. For example, in our documentation generator, we also use the result of the parser in the tasks of generating documentation using AI tools. You can also use the parser for your own purposes other than generating documentation.
In this section, we show how the parser works and what components it consists of.
$parser = new ProjectParser($configuration, $rootEntityCollectionsGroup);
// Parsing the project and filling RootEntityCollectionsGroup with data
$rootEntityCollectionsGroup = $this->parser->parse();
flowchart TD
Start((Start)) --> Init(<b>ProjectParser</b> initialization)
Init --> StartParsing(Starting the parsing process)
StartParsing --> HandlerLoop(Entering the LanguageHandlers processing loop)
HandlerLoop --> NextHandler{Is there a \nnext <b>LanguageHandler</b> \nfor parsing entities?}
NextHandler -- Yes --> LoadSourceLocators(<b>Loading SourceLocators for the current LanguageHandler</b>)
LoadSourceLocators --> GetFileList(Getting a list of files to bypass them)
GetFileList --> PopulateEntities(<b>Filling the collection with entities obtained from files</b>)
PopulateEntities --> HandlerLoop
NextHandler -- No --> ReturnResult(We return the result of the parser - <b>RootEntityCollectionsGroup</b>)
ReturnResult --> Exit(((Exit)))
Last page committer: fshcherbanich <[email protected]>
Last modified date: Sat Oct 28 11:03:31 2023 +0300
Page content update date: Mon Nov 06 2023
Made with Bumble Documentation Generator