Beispiel #1
0
        public void Parse()
        {
            var p   = new CParser(this);
            var ast = p.Parse();

            if (file.errors.Count > 0)
            {
                foreach (var err in file.errors)
                {
                    Console.WriteLine(file.ErrorToString(err));
                }
            }
            else
            {
                var json = JsonConvert.SerializeObject(ast, Formatting.Indented);
                Console.WriteLine(json);
            }
        }