diff options
Diffstat (limited to 'src/ltable.js')
-rw-r--r-- | src/ltable.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ltable.js b/src/ltable.js index 6e3af15..95ca5a5 100644 --- a/src/ltable.js +++ b/src/ltable.js @@ -1,9 +1,13 @@ /*jshint esversion: 6 */ "use strict"; +const assert = require('assert'); + const lobject = require('./lobject.js'); +const nil = require('./ldo.js').nil; const Table = lobject.Table; + /* ** Try to find a boundary in table 't'. A 'boundary' is an integer index ** such that t[i] is non-nil and t[i+1] is nil (and 0 if t[1] is nil). @@ -26,5 +30,5 @@ Table.prototype.luaH_getn = function() { /* else must find a boundary in hash part */ else if (hash.size === 0) return j; - else return j; // TODO: unbound_search(t, j) => but why ? + else return hash.get(j); };
\ No newline at end of file |