You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `clang::tooling::ClangTool::run` method takes a `clang::tooling::ToolAction` object that defines how to process the AST.
100
-
The action object that usually comes from a `clang::tooling::FrontendActionFactory`.
100
+
The action object usually comes from a `clang::tooling::FrontendActionFactory`.
101
101
In the example above, the `SyntaxOnlyAction` is used to parse the source code and generate the AST without any further processing.
102
102
103
103
In MrDocs, this process happens in `clang::mrdocs::CorpusImpl::build` (`src/lib/Lib/CorpusImpl.cpp`), where we call `Tool.run` for each object in the database with our custom `ASTAction` action and `ASTActionFactory` factory (`src/lib/AST/ASTVisitor.cpp`).
@@ -131,7 +131,7 @@ At this step, the doc comments are also finalized.
131
131
Each `Info` object has a pointer to its `Javadoc` object (`mrdocs/Metadata/Javadoc.hpp`), which is a representation of the documentation comments.
132
132
133
133
After AST traversal and `Info` merging, the result is stored as a map of `Info` objects indexed by their respective `SymbolID`.
134
-
A second finalization step is then performed in `clang::mrdocs::finalize` (`src/lib/Metadata/Finalize.cpp`), where any references to `SymbolID` objects that don't exist are removed.
134
+
A second finalization step is then performed in `clang::mrdocs::finalize`, where any references to `SymbolID` objects that don't exist are removed.
135
135
This is necessary because the AST traversal will generate references to entities that should be filtered and are not present in the corpus.
136
136
137
137
At this point, the `Corpus` object contains representations of all entities in the code base and further semantic {cpp} constructs that are not directly represented in the AST can be inferred.
@@ -223,7 +223,7 @@ The `mrdocs-test` target is used to run the test suites.
223
223
This target has its entry point in `src/test/TestMain.cpp`, which can take two paths:
224
224
225
225
* Golden testing: When input paths are provided to the test executable via the command line, the test suite will run the `DoTestAction()` that iterates all files in `test-files` comparing the input source files with the expected XML output files.
226
-
* Unit testing: When no input paths are provided, all unit tests will be run via `unit_test_main()`, defined by the our test-suite library in `src/test_suite/test_suite.cpp`.
226
+
* Unit testing: When no input paths are provided, all unit tests will be run via `unit_test_main()`, defined by our test-suite library in `src/test_suite/test_suite.cpp`.
227
227
228
228
The fixtures for golden testing are defined in `test-files/golden-tests`, where files in each directory have the following format:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/usage.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ Not only this simplifies the usage but also ensures that the stable compilation
131
131
NOTE: MrDocs does not bundle CMake.
132
132
If you want to use this feature, you need to have CMake installed on your system and available in PATH.
133
133
134
-
Parameters for cmake, such as `-D BUILDING_TEST=OFF -D MRDOCS_BUILD=ON` can also be specified with the `cmake` option in configuration file.
134
+
Parameters for cmake, such as `-D BUILDING_TEST=OFF -D MRDOCS_BUILD=ON` can also be specified with the `cmake` option in the configuration file.
135
135
MrDocs will always append the `CMAKE_EXPORT_COMPILE_COMMANDS=ON` flag to the cmake command.
136
136
137
137
[NOTE]
@@ -147,7 +147,7 @@ When the `cmake` option is provided, MrDocs will still adjust the CMake configur
147
147
148
148
In many projects, a common pattern is to define a special build configuration for the documentation generation such that:
149
149
150
-
1. Tests, examples, and auxiliary targets excluded
150
+
1. Tests, examples, and auxiliary targets are excluded
151
151
2. All header-only files are included in targets
152
152
3. Unnecessary sources files are excluded from targets
153
153
@@ -221,7 +221,7 @@ However, this ill-formed pattern is problematic:
221
221
* the developer has to effectively maintain two versions of the code
222
222
* the original source code becomes more and more unreadable
223
223
224
-
Instead, when using MrDocs, while the `\\__MRDOCS__` macro is still available for conditional compilation, the same function could be directly documented as:
224
+
Instead, when using MrDocs, while the `__MRDOCS__` macro is still available for conditional compilation, the same function could be directly documented as:
The xref:commands.adoc[] and xref:config-file.adoc[] pages contain a list of all available commands and options to identify and extract the relevant information as intended by the user.
241
241
242
-
MrDocs provides multiple mechanisms are provided to specify special {cpp} patterns, such as the example above.
242
+
MrDocs provides multiple mechanisms to specify special {cpp} patterns, such as the example above.
243
243
For each common {cpp} construct that would require macros and two versions of the code, MrDocs provides commands to identify the construct and extract the relevant information as intented by the user.
0 commit comments