[NoBrainer] Enumerate all functions in a PowerShell script file via AST
Recently I needed to check if a function was defined inside a script file. Reflection was my first thought, and PowerShell being a first class .NET citizen should be able to perform this. But as PowerShell is defined as an Abstract Syntax Tree (AST) it is even easier to achieve this. Inside the AST every block (BEGIN, PROCESS, END) is […]
