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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;

   // A snippet of code where 'rate' is both a variable and part of a string
   auto source_code = R"(rate = 0.05; // Set default rate
print("Current rate is: " + rate);)";

   cout << "Original Code:" << endl;
   cout << source_code << endl;
   cout << "" << endl;

   // Define a rule to rename the VARIABLE 'rate' to 'annual_rate'
   t.FromTo("rate", "annual_rate");
   t.SkipOver("// {text}");

   // Run the transformation. The 'rate' inside the string is untouched.
   cout << "Transformed Code:" << endl;
   cout << t.Transform(source_code) << endl;
}