Tightened the source code and README documentations in the library.

This commit is contained in:
2026-09-18 12:45:39 +02:00
parent c9f887bacb
commit 9ae10590cc
97 changed files with 854 additions and 1142 deletions
@@ -1,11 +1,8 @@
extension Lua {
/// A constant published on a registered class.
/// A class constant for `Lua.registerClass`. Wraps `lua_val`.
public enum ClassValue {
/// An integer constant.
case int(name: String, value: UInt32)
/// A floating-point constant.
case float(name: String, value: Float)
/// A string constant.
case string(name: String, value: String)
}
}
@@ -1,8 +1,9 @@
internal import CPlaydate
extension Lua {
/// The type of a value on the Lua stack.
/// The type of a value on the Lua stack. Wraps `LuaType`.
public enum Kind: UInt32, Sendable {
/// Also used for unrecognized type codes.
case `nil` = 0
case bool = 1
case int = 2
@@ -10,7 +11,9 @@ extension Lua {
case string = 4
case table = 5
case function = 6
/// A coroutine.
case thread = 7
/// Userdata.
case object = 8
init(_ type: LuaType) { self = Kind(rawValue: UInt32(type.rawValue)) ?? .nil }