<div id="yiv7633158297"><div><div class="yiv7633158297yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr">Hello everyone,</div><div dir="ltr"><br></div><div dir="ltr">I am looking into source-to-source translation with LLVM. <br>I found a tutorial but it looks out-of-date (~7 years old) - <a rel="nofollow noopener noreferrer" target="_blank" href="https://eli.thegreenplace.net/2014/05/01/modern-source-to-source-transformation-with-clang-and-libtooling/">https://eli.thegreenplace.net/2014/05/01/modern-source-to-source-transformation-with-clang-and-libtooling/</a></div><div dir="ltr"><br></div><div dir="ltr">One of the latest answers regarding the same topic in this mailing pointed to 'Transformer' class. The 'RewriteRule' looks similar to ASTMatcher, except the 'changeTo' part - which is static - can it be made dynamic? (different replacement for each match). I couldn't understand how to construct 'ChangeConsumer' object to instantiate a 'Transformer'-based tool.</div><div dir="ltr">I couldn't find any example or tutorial on how to use this interface with a stand-alone tool. Any pointer to documentation?</div><div dir="ltr"><br></div><div dir="ltr">Thanks in advance!</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div></div></div>