Skip to content

Fields #880

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

Merged
merged 10 commits into from
Apr 18, 2022
Merged

Fields #880

merged 10 commits into from
Apr 18, 2022

Conversation

HurricanKai
Copy link
Member

@HurricanKai HurricanKai commented Apr 10, 2022

This adds (struct) fields in both the symbol and emission layers. This does not include logic to include fields in a struct, it purely represents fields as symbols and is able to emit them into C# as root symbols

@HurricanKai HurricanKai changed the title Struct Members Fields Apr 18, 2022
@HurricanKai HurricanKai marked this pull request as ready for review April 18, 2022 13:39
@HurricanKai HurricanKai requested a review from Perksey as a code owner April 18, 2022 13:39
@HurricanKai
Copy link
Member Author

I am a bit unhappy about the field types. They right now just accept a TypeSymbol which is kind of wrong, since the name given there should be able to both represent an inbuild type (int) and externally defined type (System.String) and a type which has been emitted previously (-> these could be treated as "externally defined")
Right now all these goals can still be met, but it's kind of unclean (new StructSymbol(new IdentifierSymbol("int")), new StructSymbol(new IdentifierSymbol("string"))).
Note that the type given to fields can not just be a string / identifier because this should also carry whether the type is a reference or value type (and other type-related info. Maybe we should just have ExternalTypeReference?) (-> using these references we could even build the dependency tree?)

@HurricanKai HurricanKai enabled auto-merge (squash) April 18, 2022 17:46
Copy link
Member

@Perksey Perksey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my dogs on my lap so i'll just assume this is fine

@HurricanKai HurricanKai merged commit 43eb1cd into develop/3.0 Apr 18, 2022
@HurricanKai HurricanKai deleted the dev/3/struct-members branch April 18, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants