diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-27 12:15:10 +1000 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-28 14:15:58 +0200 |
commit | b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79 (patch) | |
tree | d27f1299ae4324395367703cf311ec4d3dc54ea7 /src/lparser.js | |
parent | 86c357cd0c0184b640d0c2233ff53b6f23188d90 (diff) | |
download | fengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.tar.gz fengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.tar.bz2 fengari-b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79.zip |
Add table construction function
Diffstat (limited to 'src/lparser.js')
-rw-r--r-- | src/lparser.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lparser.js b/src/lparser.js index 41a0b22..86b286a 100644 --- a/src/lparser.js +++ b/src/lparser.js @@ -9,6 +9,7 @@ const llex = require('./llex.js'); const llimit = require('./llimit.js'); const lobject = require('./lobject.js'); const lopcode = require('./lopcodes.js'); +const ltable = require('./ltable.js'); const BinOpr = lcode.BinOpr; const OpCodesI = lopcode.OpCodesI; const Proto = lfunc.Proto; @@ -1546,7 +1547,7 @@ const luaY_parser = function(L, z, buff, dyd, name, firstchar) { let funcstate = new FuncState(); let cl = lfunc.luaF_newLclosure(L, 1); /* create main closure */ L.stack[L.top++] = cl; - lexstate.h = new TValue(defs.CT.LUA_TTABLE, new Map()); /* create table for scanner */ + lexstate.h = new TValue(defs.CT.LUA_TTABLE, ltable.luaH_new(L)); /* create table for scanner */ L.stack[L.top++] = lexstate.h; funcstate.f = cl.p = new Proto(L); funcstate.f.source = new TValue(defs.CT.LUA_TLNGSTR, name); |