Don't escape math symbols in string literals
MSDN-WhiteKnight opened this issue · comments
MSDN.WhiteKnight commented
using System;
using System.Collections.Generic;
using System.Text;
using CilTools.BytecodeAnalysis;
using CilTools.BytecodeAnalysis.Extensions;
using CilTools.Syntax;
namespace NetCoreTest
{
class Program
{
public static void Foo(int x, int y)
{
if (x > y) Console.WriteLine("x>y");
else if (x == y) Console.WriteLine("x=y");
else Console.WriteLine("x<y");
}
public static void Main(string[] args)
{
CilGraph graph = typeof(Program).GetMethod("Foo").GetCilGraph();
MethodDefSyntax syntax = graph.ToSyntaxTree();
Console.WriteLine(syntax.ToString());
Console.ReadKey();
}
}
}
Current output:
ldstr "x\076y"
Expected:
ldstr "x>y"