My idea is to write a superset of C# (but question is not language-specific), so that it source-to-source compiles (transcompiles) to C# itself (fall-through switch clauses, default method parameters etc., nothing impossible in C#).
First idea was to parse it, make syntax trees, abstract trees etc. but it seems as a bit of an overkill to me, mostly because large portions of code will remain the same.
My question: Is there a simpler way to do this?
One of my ideas was to search for tokens that need modifying (e.g.
switch in case of fall-through) and then rewrite the code (add
goto case NEXT_CASE where needed) but is there a better and cleaner way to do this?