SharpForge supports int, float, double, bool, string, and null. These map directly to Lua's numeric, boolean, string, and nil types.
| C# type | Lua type |
|---|---|
int |
integer |
float |
number |
double |
number |
bool |
boolean |
string |
string |
null |
nil |
float literals are emitted source-faithfully (0.65f → 0.65, not 0.6499...). double literals are emitted with full round-trip precision.
string.Empty lowers to an empty Lua string literal.
int i = 42;
float f = 0.65f;
bool flag = true;
string s = "hello";
string empty = string.Empty;local i = 42
local f = 0.65
local flag = true
local s = "hello"
local empty = ""long, short, byte, uint, ulong, decimal, and other numeric types not listed above produce a transpiler error.