Example #1
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = ProgramInfo.GetProjectWithName(this.Name);

            ProgramInfo.ReplaceSyntaxTree(program.GetSyntaxTree(), project);
        }
Example #2
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = this.CompilationContext.GetProjectWithName(this.Name);

            this.CompilationContext.ReplaceSyntaxTree(program.GetSyntaxTree(), project);
        }
Example #3
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = this.Project;

            ProgramInfo.ReplaceSyntaxTree(program.GetSyntaxTree(), ref project);
            this.Project = project;
        }
Example #4
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = this.Project;
            ProgramInfo.ReplaceSyntaxTree(program.GetSyntaxTree(), ref project);
            this.Project = project;
        }
Example #5
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = this.CompilationContext.GetProjectWithName(this.Name);
            this.CompilationContext.ReplaceSyntaxTree(program.GetSyntaxTree(), project);
        }
Example #6
0
        /// <summary>
        /// Rewrites a P# or P program to C#.
        /// </summary>
        /// <param name="program">Program</param>
        /// <param name="tree">SyntaxTree</param>
        private void RewriteProgram(IPSharpProgram program, SyntaxTree tree)
        {
            program.Rewrite();

            var project = ProgramInfo.GetProjectWithName(this.Name);
            ProgramInfo.ReplaceSyntaxTree(program.GetSyntaxTree(), project);
        }