CMakePP / CMakePPLang

Object-oriented extension to the CMake language.
http://cmakepp.github.io/CMakePPLang/
Apache License 2.0
11 stars 4 forks source link

Treat pointer types like desc #105

Closed AutonomicPerfectionist closed 1 year ago

AutonomicPerfectionist commented 1 year ago

Is this pull request associated with an issue(s)? Fixes #96

Description This PR adds support for pointer types in signatures and type assertions by treating them like they are desc.

TODOs

AutonomicPerfectionist commented 1 year ago

I think this is ready for review, I haven't restricted the is_type check but let me know if that would be desirable

ryanmrichard commented 1 year ago

To be clear, when you say restricting the is_type check, are you referring to making sure that the the say a bool* actually points to a bool rather than pointing to say a list?

AutonomicPerfectionist commented 1 year ago

Yeah that's what I mean

ryanmrichard commented 1 year ago

Yeah, I'm fine punting on that for now.

AutonomicPerfectionist commented 1 year ago

Sounds good. I did see a couple diagrams in the documentation, I didn't modify any of them but should we? I think the only relevant one is the type relations diagram

AutonomicPerfectionist commented 1 year ago

How would a pointer to a pointer be handled in this implementation (for example, list**)?

I did think of that and it should work, but I'll definitely add tests and documentation for it

ryanmrichard commented 1 year ago

Sounds good. I did see a couple diagrams in the documentation, I didn't modify any of them but should we? I think the only relevant one is the type relations diagram

It's be good to keep the documentation in synch or at least open an issue about it.

AutonomicPerfectionist commented 1 year ago

@zachcran is there a source file somewhere for the type_relations.png diagram?

ryanmrichard commented 1 year ago

@zachcran is there a source file somewhere for the type_relations.png diagram?

Usually the diagrams contain the source as metadata. So you should just be able to open the diagram in the appropriate program. That particular diagram looks like it was drawn with https://www.drawio.com/

AutonomicPerfectionist commented 1 year ago

Hmmm, tried opening it in drawio.com and it said it wasn't a diagram file... I checked the true file type and it is indeed a png file. Checked metadata with ImageMagick and I don't see anything that could be interpreted as the diagram source

ryanmrichard commented 1 year ago

It's possible I forgot to click the "embed diagram" (or whatever they call the option) upon saving. I guess that means the image will probably need to be remade. Don't worry about doing that unless you really want to (and if you do I recommend using Excalidraw, since we've been using that instead of draw.io for some time now).

AutonomicPerfectionist commented 1 year ago

Sounds good, for now, I just added a small blurb to the RST file where the diagram is shown explaining the relationships for pointers

github-actions[bot] commented 1 year ago

🚀 [bumpr] Bumped! New version:v0.0.7 Changes:v0.0.6...v0.0.7