Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add a feature to estimate the scope information to print scoped notations correctly.
Now in docgen, there is a known problem that it cannot print the scoped notations.
The main problem was that once the source is compiled, the scope information of the definition are lost, so there is no way to know what scopes to open when printing. This is fine for globally defined notations but it cannot reflect the local notations.
getScopeInfoin this PR finds the source file and do the elaboration which are related to the scope operations (open, namespace...). And if something is defined then it captures the scope and use it when pretty printing.Note that this is just an estimation, so there may be a possibility to reflect the scope not correctly. To know the exact scope, we should do every elaboration one by one, and that is same as compiling the source again.
I also added some minor build options to skip documentation for core library or to skip this parsing process.
#general > Making docgen print the scoped notations correctly