summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-01-18 15:03:43 +0800
committerruki <[email protected]>2016-02-15 19:10:24 +0800
commit44c7d62676ce6763d013db0c031e6f651237f510 (patch)
tree2b1d33176f088d05c3931d28cfe7d325cef72d41
parent0ad84316db1fee3d4010b31d12353eddf430eddc (diff)
rename sandbox to interpreter
-rw-r--r--tests/interpreter/scope.lua (renamed from tests/sandbox/scope.lua)0
-rw-r--r--tests/interpreter/tests.lua (renamed from tests/sandbox/tests.lua)4
-rw-r--r--xmake/core/base/interpreter.lua (renamed from xmake/core/sandbox/sandbox.lua)18
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/sandbox/scope.lua b/tests/interpreter/scope.lua
index 438470d5c..438470d5c 100644
--- a/tests/sandbox/scope.lua
+++ b/tests/interpreter/scope.lua
diff --git a/tests/sandbox/tests.lua b/tests/interpreter/tests.lua
index 860df4cee..d389f5345 100644
--- a/tests/sandbox/tests.lua
+++ b/tests/interpreter/tests.lua
@@ -24,7 +24,7 @@
local tests = tests or {}
-- load modules
-local sandbox = require("sandbox/sandbox")
+local interpreter = require("base/interpreter")
-- the main function
function tests.main(self, file)
@@ -33,7 +33,7 @@ function tests.main(self, file)
assert(file and #file == 1)
-- load it
- local ok, errors = sandbox.load(file[1])
+ local ok, errors = interpreter.load(file[1])
if not ok then
print(errors)
return false
diff --git a/xmake/core/sandbox/sandbox.lua b/xmake/core/base/interpreter.lua
index 1e534a928..ced71b128 100644
--- a/xmake/core/sandbox/sandbox.lua
+++ b/xmake/core/base/interpreter.lua
@@ -17,18 +17,18 @@
-- Copyright (C) 2009 - 2015, ruki All rights reserved.
--
-- @author ruki
--- @file sandbox.lua
+-- @file interpreter.lua
--
--- define module: sandbox
-local sandbox = sandbox or {}
+-- define module: interpreter
+local interpreter = interpreter or {}
-- load modules
local os = require("base/os")
local utils = require("base/utils")
-- traceback
-function sandbox._traceback(errors)
+function interpreter._traceback(errors)
-- init results
local results = ""
@@ -68,8 +68,8 @@ function sandbox._traceback(errors)
return results
end
--- load sandbox
-function sandbox.load(file)
+-- load interpreter
+function interpreter.load(file)
-- check
assert(file)
@@ -88,7 +88,7 @@ function sandbox.load(file)
-- setfenv(script, env)
-- done the script
- local ok, errors = xpcall(script, sandbox._traceback)
+ local ok, errors = xpcall(script, interpreter._traceback)
if not ok then
return nil, errors
end
@@ -97,5 +97,5 @@ function sandbox.load(file)
return nil
end
--- return module: sandbox
-return sandbox
+-- return module: interpreter
+return interpreter