The Script .NET

[Back] [Examples] [Feedback]





What is Meta Programming?

Script .NET has a special quotation operator <[ program ]> which returns AST of a given program. The AST of the current program may be accessed with prog object.

Here is an example: Modification of current script
              //Create an AST for MessageBox.Show('Hello'); program
              ast = <[ MessageBox.Show('Hello'); ]>;

              //Add this AST at the and of the current program
              prog.AppendAst(ast);

              MessageBox.Show(prog.ConcreteSyntaxTree());
              

The <[ ... ]> operator and prog object allows Script.NET to generate new scripts or modify existing script at the run-time.


Support Script.NET project, keep it alive:

[Send e-mail]

Last updated: 1 November 2007
Created: 1 November 2007