using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); // A snippet of code where 'rate' is both a variable and part of a string var source_code = """ rate = 0.05; // Set default rate print("Current rate is: " + rate); """; Console.WriteLine("Original Code:"); Console.WriteLine(source_code); Console.WriteLine(""); // 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. Console.WriteLine("Transformed Code:"); Console.WriteLine(t.Transform(source_code));