using uCalcSoftware; var uc = new uCalc(); using (var t = new uCalc.Transformer()) { // Define a rule to replace the alphanumeric token 'x' with 'value' t.FromTo("x", "value"); var code = """ x = 10; print("The max value is x."); """; // The Transformer correctly identifies that the first 'x' is a variable token // and the second 'x' is part of a string literal token. // The replacement is only applied to the variable. Console.WriteLine(t.Transform(code)); };