include all default globals

This commit is contained in:
leaf corcoran 2013-12-26 01:41:45 -08:00
parent 4cacbec0f8
commit 009bf8eff7
2 changed files with 74 additions and 2 deletions

View File

@ -14,7 +14,43 @@ do
Block = _obj_0.Block Block = _obj_0.Block
end end
local whitelist_globals = Set({ local whitelist_globals = Set({
"print" 'loadstring',
'select',
'_VERSION',
'pcall',
'package',
'error',
'rawget',
'pairs',
'xpcall',
'rawlen',
'io',
'loadfile',
'ipairs',
'table',
'require',
'os',
'module',
'debug',
'type',
'getmetatable',
'rawequal',
'dofile',
'unpack',
'math',
'load',
'bit32',
'string',
'rawset',
'tostring',
'print',
'assert',
'_G',
'next',
'setmetatable',
'tonumber',
'collectgarbage',
'coroutine'
}) })
local LinterBlock local LinterBlock
do do

View File

@ -5,7 +5,43 @@ import Block from require "moonscript.compile"
-- globals allowed to be referenced -- globals allowed to be referenced
whitelist_globals = Set { whitelist_globals = Set {
"print" 'loadstring'
'select'
'_VERSION'
'pcall'
'package'
'error'
'rawget'
'pairs'
'xpcall'
'rawlen'
'io'
'loadfile'
'ipairs'
'table'
'require'
'os'
'module'
'debug'
'type'
'getmetatable'
'rawequal'
'dofile'
'unpack'
'math'
'load'
'bit32'
'string'
'rawset'
'tostring'
'print'
'assert'
'_G'
'next'
'setmetatable'
'tonumber'
'collectgarbage'
'coroutine'
} }
class LinterBlock extends Block class LinterBlock extends Block