-
Notifications
You must be signed in to change notification settings - Fork 42
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
Added LanguageConfig concept, implemented function_macro_prepend option #226
Conversation
Thanks! I had something like that in the back of my mind, but never got to implement it (I have a slightly more dynamic/extensible idea using "the
But since the current code does hard-code Since this a rather major PR, I will wait a bit to be testing it on other codebases and whatnot, but if in 2-3 weeks I haven't come back to this, do ping me, and we'll work on merging and releasing it 🙂 |
I attempted to try and hide the |
# Conflicts: # src/headers/languages/c.rs
@danielhenrymantilla I've updated this PR for recent changes, do you have time to look at merging? |
Is there any kind of testing I can do to help expedite merging of this PR? I have quite a few other formatting features I need to build off this which I'm hesitating to add at the moment as they're only going to make it larger. |
Due to development urgency, I've unfortunately had to move to another solution so can't maintain this PR going forward, happy to pass to anyone else if they would find it useful. |
In order to allow easier customisation of generated header files on a per-language basis, I've expanded the
Language
enum to contain a per-language configuration (CLanguageConfig
,CSharpLanguageConfig
, etc.), which is then propagated to methods ofHeaderLanguage
implementers. Consequently I have renamedLanguage
toLanguageConfig
to better describe this new function.The first config option I have added is based on my query in #202, which allows optional insertion of a custom macro text before each function definition. There's a good deal of other potential config options I'd like to add but holding off until I get approval on this approach for adding the
LanguageConfig
struct to contain and distributed this.