-
Notifications
You must be signed in to change notification settings - Fork 365
Support c++ cli #582
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
Support c++ cli #582
Conversation
|
@Bertk saw there are many changes independent from C++/CLI. |
|
@guwirth I am rebasing but have some Problems because the sync with upstream was not executed. Now I need some minutes to complete rebasing but I got errors with` |
b45d21e to
2ad5b14
Compare
|
@guwirth I did not fix the CxxPublicApiVisitorTest.java issue. |
|
@lcintrat Can you please take a look at CxxPublicApiVisitorTest.java and give some hints how to fix it. I did not expect to break the unit test when I modified the grammar. |
|
@guwirth I corrected some grammar but if you want to do cherry picking - now is the right time for this 😉 |
|
@Bertk have anyway less time at the moment can also wait by Sunday. |
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 undo the fix from @lcintrat.
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 think there is an issue in AbstractCxxPublicApiVisitor and the "operator=" is now effective because of my grammar updates but not handled correctly. I wanted to get some hints from @lcintrat but did not get feedback until now.
After my investigation for the issue I have some concerns about the design of this visitor and in my understanding most the methods should be implemented in cxx-checks and not in cxx-squid. The class has a strong dependency to the AST which creates maintenance effort for further grammar updates.
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 did some more analysis and the algorithm to detect the "= default" fails because of C++/CLI extension
b.rule(unqualifiedId).is(
b.firstOf(
templateId,
IDENTIFIER,
operatorFunctionId,
conversionFunctionId,
literalOperatorId,
b.sequence("~", className),
b.sequence("~", decltypeSpecifier),
b.sequence("!", className),
cliGenericId,
CxxKeyword.DEFAULT
)
);
the AST looks now different:
Removing this extension of unqualfied ID creates several parser errors in C++/CLI code 😟
|
@Bertk ready to merge? Please rebase and squash... |
- support data type keywords: "ref", "value" - support override specifiers: "sealed", "abstract" - support access specifiers: "internal" - support "for each, in" initial support for CLI CLI Attributes Support improve CLI attributes support enhance property support - support namespace for property - add more test samples - remove CLI keywords from CxxKeyword except "gcnew" initial support for CLI CLI Attributes Support improve CLI attributes support enhance property support - support namespace for property - add more test samples - remove CLI keywords from CxxKeyword except "gcnew" add test files update forRangeDeclSepcifierSeq to consider "in" token value fix CxxPublicApiVisitorTest.java "operator=" is not ignored. Make test working again without correction. revert CxxPublicApiVisitorTest updates - reorder sequence of rules in memberDeclaration - adjust class complexity check
|
@guwirth Done and Travis CI has started. |
Initial C++/CLI Support (experimental)
Known limitation:
New keywords cannot be used as identifier (names)
List of added CxxKeyword :