[cfe-dev] Source to source transformation : objc to c#

Vincent R. forumer at smartmobili.com
Sat Jul 13 04:57:39 PDT 2013


Le 13.07.2013 02:13, jahanian a écrit :
> Yes, it is doable. We already have a translation tool to rewrite
> Objective-C into c++.
> See Frontend/RewriteModernObjC.cpp as an example of how it i done.
> This tool has a limitation and a drawback. It only works on
> pre-processed files.
> Also, coding style in this tool is dated.
>


and let's consider the following code :

/**<p>Returns whether the button cell is transparent.</p>
    <p>See Also: -setTransparent:</p>
  */
- (BOOL) isTransparent
{
   return _buttoncell_is_transparent;
}

/**<p>Sets whether the button cell is transparent.</p>
    <p>See Also: -isTransparent </p>
  */
- (void) setTransparent: (BOOL)flag
{
   _buttoncell_is_transparent = flag;
}


once transformed will it be possible to keep comments ?
Actually since clang is transforming the source code into an AST I am 
wondering if clang is not
too heavy for my task and will generate some ugly code.



More information about the cfe-dev mailing list