Eisenwave / cdecl-plus

Similar to cdecl.org, but with broader support for language features. Static web page which supports file protocol. Parsing and to-prose conversion happen in the front-end, resulting in instant feedback.
https://cdecl.plus/
MIT License
32 stars 4 forks source link

[Feature request] Make it possible to convert multiple types #31

Closed cjdb closed 2 months ago

cjdb commented 2 months ago

I've got a gnarly pointer type mismatch, and I'd like to see their respective proses on the screen at the same time. Would it be possible to add a '+' button that lets you convert more than one type at a time please?

Eisenwave commented 2 months ago

You can already write int x, y to get information about two separate declarations. However, this is obviously limited to both declared entities having the same decl-specifier-seq.

I guess it shouldn't be too difficult to also allow ; as a separator to have multiple declarations in the same prompt. I'd prefer to keep it closer to C++, so no plus button though.

I'll implement this when I do maintenance on cdecl.plus again.

cjdb commented 2 months ago

I'll implement this when I do maintenance on cdecl.plus again.

Thanks!

I'd prefer to keep it closer to C++, so no plus button though.

Sorry, I'm not following. How is adding a web element taking this further from C++?

Eisenwave commented 2 months ago

Sorry, I'm not following. How is adding a web element taking this further from C++?

Because it would be solving the issue using additional UI elements instead of letting cdecl.plus simply accept a larger subset of C++.

If it can be solved by just making the text prompt more powerful, that's preferable, and it's overall less work.