summaryrefslogtreecommitdiff
path: root/xmake/core/base/interpreter.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-11-17 23:38:54 +0800
committerruki <[email protected]>2019-11-17 23:38:54 +0800
commitcf984b4a0e9e4ea733f2c35deca3b714baa2a227 (patch)
treea543106b0ceca6f81d7528749bc3812adbeefdc1 /xmake/core/base/interpreter.lua
parentf5258628ba215481571ce1e957737b2ed97c45ab (diff)
add .xmakerc.lua
Diffstat (limited to 'xmake/core/base/interpreter.lua')
-rw-r--r--xmake/core/base/interpreter.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index 12dc62fa4..2c3cfc52d 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -691,13 +691,17 @@ function interpreter.new()
end
-- load script file, e.g. xmake.lua
-function interpreter:load(file)
+--
+-- @param opt {on_load_data = function (data) return data end}
+--
+function interpreter:load(file, opt)
-- check
assert(self and self._PUBLIC and self._PRIVATE and file)
-- load the script
- local script, errors = loadfile(file)
+ opt = opt or {}
+ local script, errors = loadfile(file, "bt", {on_load = opt.on_load_data})
if not script then
return nil, errors
end