aboutsummaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 725f63d..5860f67 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -189,28 +189,22 @@ class LClosure extends TValue {
}
-class TString extends TValue {
-
- constructor(string) {
- super(CT.LUA_TSTRING, string);
- }
-
-}
+class CClosure extends TValue {
+ constructor(n, f) {
+ super(CT.LUA_TCCL, null);
-class Userdata extends TValue {
-
- constructor(jsObject) {
- super(CT.LUA_TUSERDATA, jsObject);
+ this.f = f;
+ this.nupvalues = n;
+ this.upvalue = new Array(n);
- this.metatable = null;
+ this.value = this;
}
}
module.exports.LClosure = LClosure;
+module.exports.CClosure = CClosure;
module.exports.TValue = TValue;
-module.exports.Table = Table;
-module.exports.TString = TString;
-module.exports.Userdata = Userdata; \ No newline at end of file
+module.exports.Table = Table; \ No newline at end of file