public static string ToRelString(this Rel relation) { //UglyPatch var str = relation == Rel._None ? string.Empty : string.Join("-", Regex.Split(relation.ToString().Replace(",", ""), "(?<=[a-z])(?=[A-Z])")).ToLower(); return(string.Join(" ", str.Split(' ').Where(x => !x.StartsWith("_")))); }
public void TestRel() { var isLess = new Rel(new Token('<'), new Constant(10), new Constant(100)); Assert.AreEqual("10 < 100", isLess.ToString()); isLess.Jumping(42, 99); //output: // if 10 < 100 goto L42 // goto L99 }