Exemplo n.º 1
0
        public static string ToString(IAstNode ast, bool showOffsets = false)
        {
            var dumper = new DumpAstVisitor(showOffsets);
            var code   = ast.Accept(dumper);

            return(code);
        }
Exemplo n.º 2
0
        public static void AstEquals(IAstNode astExpected, IAstNode astActual, bool showOffsets = false)
        {
            var dumper = new DumpAstVisitor(showOffsets);

            var expectedCode = astExpected.Accept(dumper);
            var actualCode   = astActual.Accept(dumper);

            Check.That(actualCode).IsEqualTo(expectedCode);
            Console.WriteLine(expectedCode);
        }
Exemplo n.º 3
0
        public static void AstEquals(IAstNode astExpected, IAstNode astActual, bool showOffsets = false)
        {
            var dumper = new DumpAstVisitor(showOffsets);

            var expectedCode = astExpected.Accept(dumper);
            var actualCode = astActual.Accept(dumper);

            Check.That(actualCode).IsEqualTo(expectedCode);
            Console.WriteLine(expectedCode);
        }
Exemplo n.º 4
0
 public static string ToString(IAstNode ast, bool showOffsets = false)
 {
     var dumper = new DumpAstVisitor(showOffsets);
     var code = ast.Accept(dumper);
     return code;
 }