-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++: concepts #4065
Comments
Thank you for reporting.
This is broken as a tags file. At least
In the above example, In addition, like
This step is the most important.
|
Thanks. I believe that, as a first approximation, we could tag a concept as a type (Since a concept is a generalization of a type.) But yes, tagging this correctly instead of a type should be the correct (long-term) solution. On designing the ideal tag output... I have no idea so I'm going to guess what could be relevant.
Thus, the most verbose output for template <typename T> concept foo = true; would be
Does that make sense? I'll look into writing a simple test. |
Would the following test make sense:
Is it correct, that
|
I have studied "concepts" on the page https://cpprefjp.github.io/lang/cpp20/concepts.html (Japanese). I found supporting "concepts" is not an easy task. Extracting the definition of a concept may be simple. Let's focus on parsing definitions. I read your comments. I agree with your analysis.
So, we will make two pull requests.
It seems that people call this approach test-driven development.
Looks good. In addition, could you add Let's add more new lines for testing
expected.tags:
args.ctags:
In the future, it will be nice if the parser can extract
@mattkretz, could you make the |
The name of the parser: C++
The command line you used to run ctags:
The content of input file:
The tags output you are not satisfied with: It's empty.
The tags output you expect:
The version of ctags:
How do you get ctags binary: Building it locally from git master.
I'm willing to give a pull request a shot.
cxxParserParseBlockInternal
, handleCXXKeywordCONCEPT
in the switch, call a newcxxParserParseConcept
function. That's how far I got. I'd start with a copy of thecxxParserParseEnum
function and try to adapt that. Does that sound right? Any guidance?The text was updated successfully, but these errors were encountered: