PSLambda
PSLambda copied to clipboard
A runtime compiler for PowerShell ScriptBlock objects.
Casting and `-as` are both funneled through `LanguagePrimitives.ConvertTo` or `LanguagePrimitives.TryConvertTo`. These can produce some unexpected results when expecting a more static typing system. Right now the `-is` and `-isnot` operators...
Example: ```powershell generic([Linq.Enumerable]::ToArray($items)) ``` It should throw a parse exception with description and error extent.
Right now extension methods are cached, but only once per instance of `CompileVisitor` (once a delegate). The cache should be between all instances, and should be updated using the `AppDomain.AssemblyLoad`...
The largest hurdle towards using PSLambda for anything outside of interactive use is lack of ability to debug. From a glance it doesn't look easy. The `LambdaExpression.Compile` method does take...
`Assembly.GetTypes()` throws if an assembly cannot find one of it's dependencies. Basically just need to catch any exceptions and ignore that assembly.