JumpNotZero/NLua — Issue #1: Begin creating Lua to CLS object translator
Author: JumpNotZero
Created: 2011-11-14 04:30:03+00:00
State: open

An object translator which exposes Lua tables and the elements within to the CLR as CLS-compliant objects.
This object translator should create dynamic objects representing these tables and translate each Lua type to the correct CLS type.

The conversions are as follows:
A Lua boolean is translated to a CLS boolean
A Lua number is translated to a CLS double
A Lua function is translated to a CLS delegate with a matching signature*
A Lua table is translated to a late bound dynamic invocation object (dynamic in C#)

* Multiple return values are handled by the first value being the return value and all subsequent values becoming "out" parameters in the CLS delegate. Any errors raised in the Lua function generate exceptions for the caller.