#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   {
      uCalc::Transformer t;
      t.Owned(); // Causes t to be released when it goes out of scope
      // This rule will only match the standalone token 'rate', not 'exchange_rate'.
      t.FromTo("rate", "interestRate");

      auto code = "var exchange_rate = 0.5; var rate = 0.1;";
      cout << t.Transform(code) << endl;
   }
}