Skip to content
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 Preprocessing Wrappers #84

Merged
merged 2 commits into from Aug 19, 2019

Conversation

@udaken
Copy link
Contributor

commented Aug 15, 2019

Added few wrapper classes to handle preprocessing cursors..

  • InclusionDirective
  • PreprocessingDirective
  • MacroExpansion
  • MacroDefinition
@msftclas

This comment has been minimized.

Copy link

commented Aug 15, 2019

CLA assistant check
All CLA requirements met.

@@ -80,6 +80,10 @@ internal static Cursor Create(CXCursor handle)
{
result = Attr.Create(handle);
}
else if (handle.IsPreprocessing)
{
result = Preprocessing.Create(handle);

This comment has been minimized.

Copy link
@tannergooding

tannergooding Aug 15, 2019

Member

nit: I've tried to mirror the Clang C++ API structure where applicable.

In this case, it would be:

class PreprocessedEntity : Cursor  { }
class MacroExpansion : PreprocessedEntity { }
class PreprocessingDirective : PreprocessedEntity { }
class InclusionDirective : PreprocessingDirective { }
class MacroDefinitionRecord : PreprocessingDirective { }

This comment has been minimized.

Copy link
@tannergooding

tannergooding Aug 15, 2019

Member

Following the C++ API gives a structured layout that closely mirrors the actual OOP API design and allows various bits of code to be shared where it makes sense due to the backing data the cursor handles represent

@tannergooding

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Overall LGTM.

Just a nit about the layout of the types.

@udaken

This comment has been minimized.

Copy link
Contributor Author

commented Aug 18, 2019

@tannergooding Thank you for the review.
I changed it.

@tannergooding tannergooding merged commit 6e994d7 into microsoft:master Aug 19, 2019

10 checks passed

license/cla All CLA requirements met.
Details
microsoft.ClangSharp Build #20190818.1 succeeded
Details
microsoft.ClangSharp (macos_debug_x64) macos_debug_x64 succeeded
Details
microsoft.ClangSharp (macos_release_x64) macos_release_x64 succeeded
Details
microsoft.ClangSharp (ubuntu_debug_x64) ubuntu_debug_x64 succeeded
Details
microsoft.ClangSharp (ubuntu_release_x64) ubuntu_release_x64 succeeded
Details
microsoft.ClangSharp (windows_debug_x64) windows_debug_x64 succeeded
Details
microsoft.ClangSharp (windows_debug_x86) windows_debug_x86 succeeded
Details
microsoft.ClangSharp (windows_release_x64) windows_release_x64 succeeded
Details
microsoft.ClangSharp (windows_release_x86) windows_release_x86 succeeded
Details
@tannergooding

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

Thanks!

@udaken udaken deleted the udaken:add_preprocessing_wrappers branch Aug 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.