dawnbeen / c_formatter_42

C language formatter for 42 norminette
GNU General Public License v3.0
176 stars 17 forks source link

Fix long function declarations with parentheses in them #65

Closed younesaassila closed 1 year ago

younesaassila commented 1 year ago

Turns out my fix for #58 from yesterday didn't take into account functions declarations with parens in them like this one:

static void st_merge_fields_in_curr(char *strs[3], t_tok_lst **curr, void (*del)(void *));

This leads to the formatter not detecting them as func declarations and thus not indenting them properly

This fixes the regexes and I've ensured #58 stays fixed

I blame ChatGPT!