diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 11:58:00 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 11:58:00 +0100 |
commit | 16cdb860e9e8e5550c1178a41eabb52e461ffa46 (patch) | |
tree | 87b2aa1ad671927134696c0cd1e61f2edd7e0abd /src/lobject.js | |
parent | 58c57c57354fce407b11c0d63f8926edf5f469c0 (diff) | |
download | fengari-16cdb860e9e8e5550c1178a41eabb52e461ffa46.tar.gz fengari-16cdb860e9e8e5550c1178a41eabb52e461ffa46.tar.bz2 fengari-16cdb860e9e8e5550c1178a41eabb52e461ffa46.zip |
TValue.id to print something when tostring({})
Diffstat (limited to 'src/lobject.js')
-rw-r--r-- | src/lobject.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js index 8d6b6a3..3cbde26 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -8,9 +8,12 @@ const lua = require('./lua.js'); const CT = lua.constant_types; const UpVal = require('./lfunc.js').UpVal; +let tvalueCount = 0; + class TValue { constructor(type, value) { + this.id = tvalueCount++; this.type = type; this.value = value; this.metatable = null; |