From a1b559a3a269bbee1ae9a33061b08a868ea52f5c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 25 Jan 2019 15:49:29 -0800 Subject: Added metatables for bool, number, function, coroutine. Added run-time check to make sure precompiled code used the same version of Lua. Methods can now be used in (* compiles to *), etc. --- nomsu_environment.moon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nomsu_environment.moon') diff --git a/nomsu_environment.moon b/nomsu_environment.moon index 8cd3228..1deac6f 100644 --- a/nomsu_environment.moon +++ b/nomsu_environment.moon @@ -58,8 +58,8 @@ nomsu_environment = Importer{ :error, :package, :os, :require, :tonumber, :tostring, :string, :xpcall, :print, :loadfile, :rawset, :_VERSION, :collectgarbage, :rawget, :rawlen, :table, :assert, :dofile, :loadstring, lua_type_of:type, :select, :math, :io, :load, - :pairs, :ipairs, :jit, :_VERSION - bit: (jit or _VERSION == "Lua 5.2") and require('bitops') or nil + :pairs, :ipairs, :jit, :_VERSION, LUA_VERSION: (jit and jit.version or _VERSION), + LUA_API: _VERSION, Bit: (jit or _VERSION == "Lua 5.2") and require('bitops') or nil -- Nomsu types: a_List:List, a_Dict:Dict, Text:Text, -- Utilities and misc. -- cgit v1.2.3