/// <summary> /// Parses a P syntax tree to C#. /// </summary> /// <param name="tree">SyntaxTree</param> private void ParsePSyntaxTree(SyntaxTree tree) { var root = (CompilationUnitSyntax)tree.GetRoot(); var tokens = new PLexer().Tokenize(root.ToFullString()); var program = new PParser(this, tree).ParseTokens(tokens); this.PPrograms.Add(program as PProgram); this.ProgramMap.Add(program, tree); }