Posts Tagged ‘ast’

Detouring Win32 Function Calls in PowerShell

Detouring Win32 API function calls is a more common practice than some may think. A long standing Microsoft research project has made this very easy in unmanaged code. The Detours project injects a hook in between a process and a Windows library (or any library for that matter). So when the process goes to call […]

Catch me at the PowerShell Summit spring 2013!

Coming this spring is the first PowerShell Summit! It will be held in Redmond on the Microsoft campus. There will be PowerShell team members, MVPs and others (like me) speaking about all kinds of PowerShell topics. I’ll be digging in to some really advanced topics that probably won’t help you get your job done any […]

Using Roslyn and PowerShell 3 to Convert C# to PowerShell

Right after seeing Jason Bock’s Roslyn session at That Conference I wanted to combine the two abstract syntax tree systems to do something like this. I haven’t finished a full working copy but anticipate making something that isĀ usableĀ via the command line or other projects in DLL form. With Roslyn, one of the samples creates a […]

PowerShell AST Modification

As I’ve mentioned in a few posts the AST is now public in PowerShell 3.0. Each node in the AST derives from the AST class which in turn implements the Visit method. The Visit method accepts an ICustomAstVisitor instance that is used to visit the different nodes within the AST. This gives us a chance […]