using uCalcSoftware; var uc = new uCalc(); var t = new uCalc.Transformer(); // A rule to replace the alphanumeric token 'x' with 'value' t.FromTo("x", "value"); // The input string where 'x' appears both as a variable and inside a string var code = """ if (x > 10) print("Max value is x"); """; // The transformation correctly ignores the 'x' inside the quoted string Console.WriteLine(t.Transform(code));