Skip to content

Add support for static varaibles #213

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

Closed
wants to merge 1 commit into from

Conversation

jarzec
Copy link
Contributor

@jarzec jarzec commented Jan 8, 2023

This PR is my attempt at #212 with tests.

@@ -519,6 +519,7 @@ struct type_id_node
{
source_position pos;

token const* static_qualifier = {};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Explanation] I could have easily included static in pc_qualifiers (that could be renamed). I decided against that as static is of somewhat different nature.

Copy link
Owner

@hsutter hsutter Jan 9, 2023

Choose a reason for hiding this comment

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

Yes, that's the way I tend to handle these qualifiers.

But I feel bad that I'm going to close this PR unmerged now, seeing all the work you've put into it -- as I mentioned on #212 I'm still thinking about what I want to do for static variables and I'd like to push them down the road, especially to get experience with classes first (and how the demands for static members unfolds there)... sorry, and thanks for understanding!

@jarzec jarzec marked this pull request as ready for review January 8, 2023 13:59
@hsutter
Copy link
Owner

hsutter commented Jan 9, 2023

Closing for now per comment above and #212 -- thanks for understanding! I appreciate the work you put into this though and that you wrote the code thoughtfully and included lots of test cases.

@hsutter hsutter closed this Jan 9, 2023
@jarzec
Copy link
Contributor Author

jarzec commented Jan 9, 2023

I understand and agree with your remarks. The work is not lost - I got to understand better how the code works.
BTW. do you already have a time frame for simple classes? I think this is the last bit missing before cppfront can be rewritten in Cpp2 😉.

@hsutter
Copy link
Owner

hsutter commented Jan 9, 2023

Now that I've caught up on issues and PRs (barring a new wave) I hope to be able to start looking at the next set of features... thanks again.

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