-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple documentation items with the same name
The architecture of doxylink was based on a name:item dict, which doesn't support storing multiple items with the same name. This lead to several workarounds: * To support overloaded functions, function items were turned to name:FunctionList; * To prevent friend declarations from conflicting with classes, friends were skipped. Issues remained nevertheless: C++ allows declaring a class, a function, and a variable with the same name: int a; void a(); class a; In addition, a common pattern with Qt is to declare properties with the same name as the getter (Qt itself does this all the time): class Foo: public QObject { Q_OBJECT Q_PROPERTY(int bar GET bar) public: int bar() const; }; In all the above examples, doxylink was just crashing when parsing the Doxygen index. Instead of adding new exceptions, this commit changes the architecture to allow multiple symbols with the same name. Duplicate names may still raise an error, but only when one tries to refer to such an entry. This means that all other symbols in the project can now be used instead of failing during initialisation. With this PR, it should be possible to create a domain in the future, supporting much of the same syntax as the built-in [cpp domain](https://www.sphinx-doc.org/en/master/usage/domains/cpp.html#cross-referencing) Supersedes #31. Closes #54.
- Loading branch information
Showing
3 changed files
with
178 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.