hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.24k stars 224 forks source link

[SUGGESTION] Refactorings for to_cpp1.h file #1047

Open dutkalex opened 3 months ago

dutkalex commented 3 months ago

This PR contains a handful of small helper extractions to simplify the to_cpp1.h file, which reduces its length by about 1000 lines. Indeed, this file is very long and I believe that there are a lot of low hanging fruits like these ones... What do you think about that?

dutkalex commented 3 months ago

Behavior should be exactly the same, to the notable exception of the value of source_loaded in the case of a wrong file extension. Indeed, with the current implementation source_loaded == true in that case although file loading is bypassed, which I believe is a bug...

hsutter commented 1 month ago

Thanks for your pull request! It looks like this may be your first contribution to cppfront. I need to send you the Contributor License Agreement (CLA) but I don't have your email address -- please email me at first dot last at gmail. Once it's signed I can look at your pull request. Thanks again for your contribution.

dutkalex commented 1 month ago

@hsutter email sent :)

dutkalex commented 1 month ago

It seems like something went wrong here, but I won't try to fix it without knowing first if this is something you are interested in...

dutkalex commented 1 month ago

Seems like the problem has been fixed...