Exemple #1
0
        public string Compile(string st)
        {
            var sb = new StringBuilder();
            var astNode = new JackParser().Parse(st);

            var syt = new Syt(null);

            CompileRecursive(astNode, syt, sb);

            return sb.ToString();
        }
Exemple #2
0
        public string Compile(string st)
        {
            var sb      = new StringBuilder();
            var astNode = new JackParser().Parse(st);

            var syt = new Syt(null);

            CompileRecursive(astNode, syt, sb);

            return(sb.ToString());
        }
Exemple #3
0
        public static void Parse(string fpatJack, string fpatXml)
        {
            var stJack = U.StFromResource(typeof (Tests), fpatJack);
            var stXml = XDocument.Parse(U.StFromResource(typeof (Tests), fpatXml)).ToString();

            var n = new JackParser().Parse(stJack);
            //var xdoc = new XDocument();
            //using (var xw = XmlWriter.Create(xdoc.CreateWriter(), new XmlWriterSettings {IndentChars = "  "}))
            //{
            //    n.ToXml(xw);
            //}

            //Console.WriteLine(xdoc.ToString());
               // Assert.AreEqual(stXml, xdoc.ToString());
        }