-
Notifications
You must be signed in to change notification settings - Fork 205
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
[SwiftBindings] Added basic C# file support and file writing code #2937
base: feature/swift-bindings
Are you sure you want to change the base?
Conversation
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.
Remove src/Swift.Runtime/src/Metadata/TypeMetadata.cs
, I guess it was added by mistake.
@@ -0,0 +1,112 @@ | |||
// Copyright (c) Microsoft Corporation. |
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.
Is this needed?
@@ -0,0 +1,98 @@ | |||
// Copyright (c) Microsoft Corporation. |
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.
Isn't this part of the emitter's environment? This should be known by parsing the ABI.
@@ -0,0 +1,27 @@ | |||
// Copyright (c) Microsoft Corporation. |
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.
Isn't this part of the emitter's environment? This should be known by parsing the ABI.
We need this in the string-based emitter as well. I suggest extracting it from the |
This is a fine example. We should not be emitting license headers like this into the generated bindings. The binding generator is a compiler. The default licensing for compiler outputs is that compiler outputs are redistributable without additional restrictions. The only restrictions are based on the license of the compiler inputs used to produce the output. |
This adds the basic elements needed to support a simple (empty) C# file with the modern namespace declaration.
This adds a simple CodeWriter for writing elements out.
This adds the elements for C#:
Note that several of these types have the fluent method "And" which is useful for chaining things together.
for example: