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

[Rgen] Add a binding syntax factory that will generate C# expressions. #21980

Merged
merged 10 commits into from
Jan 15, 2025
Next Next commit
[Rgen] Add a biding syntax factory that will generated C# expressions.
Add the initial implementation of a syntaxt factory that can be used to
generate the C# calls needed by the bindings.

This implementation only contains the Getter methods needed to retrieve
fields in order to keep PRs in a reasonable size.

Example usage when writting a bindings:

```csharp
sb.AppendRaw($@"
if ({property.Name} is null)
    {property.Name} = {FieldConstantGetter (property)};
return {property.Name}
";
```

The API takes advantes of the fact that the data model has all the
needed infor and the makes the code cleaner when importing it with a
statuc using.
mandel-macaque committed Jan 15, 2025
commit 5b01b145a5379ef5b7e308245755884469834428
Loading