SeeminglyScience / ILAssembler

ILAsm-like DSL for PowerShell
MIT License
16 stars 1 forks source link

Allow (force?) anonymous method signatures for calli #16

Closed SeeminglyScience closed 4 years ago

SeeminglyScience commented 4 years ago

Examples:

calli unmanaged stdcall { [int]([pointer[int]], [int]) }

# Use array expression for parameterless
calli unmanaged stdcall { [int]@() } 
il { [StringBuilder]([StringBuilder] $sb) } {
    ldarg.0
    ldc.i4.s 99
    ldarg.0
    ldvirtftn { [StringBuilder] [StringBuilder].Append([char]) }
    calli default { [pointer[void]]([pointer[void]] $this, [char] $value) }
    ret
}