-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add support for C++ #186
Add support for C++ #186
Conversation
Nice work! That is how types works in java/ts as well. ie without qualifiers. Look at the other languages and do similar test for cpp and if they all pass we should be golden :) Could this be used for plain c as well? Same as our typescript definition is used for javascript? If so then please add plain c to the index file as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great modulo minor comment! Let's get some tests in there and merge it in. I added some basic docs that might help
value: valueMatcher("*[declarator][value]", "*[value]"), | ||
collectionItem: argumentMatcher("initializer_list"), | ||
argumentOrParameter: argumentMatcher("parameter_list", "argument_list"), | ||
xmlAttribute: "attribute" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either rename xmlAttribute
to attribute
or add another scope type for this use case. @AndreasArvidsson any opinions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it makes sense to rename it, since the voice command is just attribute
.
Note that I don't have a real use case for selecting attributes -- I just went through the list of scopes in cursorless help
and set up all that make sense for C++.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to use this same spoken word for other types of attributes I think we should rename the scope type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed in #198; fine to merge this one in without it
@dgrunwald ok looking great! last thing:
And would prob be worth adding one test for c just to make sure it doesn't break. No need to re-test all scope types I don't think |
My first attempt at adding C++ support. No automatic tests yet.
I think it works fairly well except for the
type
modifier -- that currently selects only the type, not the declarators. (i.e. onlyint
inconst int* p = NULL;
)