From b45dc3dd1e3f9ef4548a5e422cb6f7daa9a3ba79 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 27 Apr 2017 12:15:10 +1000 Subject: Add table construction function --- src/lparser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lparser.js') 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); -- cgit v1.2.3-54-g00ecf