summaryrefslogtreecommitdiff
path: root/xmake/core/base/interpreter.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-04 22:41:25 +0800
committerruki <[email protected]>2019-06-04 10:08:31 +0800
commit18663d52e5ff484eea423f88cbf52cc10c5721f3 (patch)
tree3e1e147713b4ca50276b676b9b346f52f893708b /xmake/core/base/interpreter.lua
parent255d51be7e7ed10a13a4cd55b5aae55079ab4bb9 (diff)
improve string.split
Diffstat (limited to 'xmake/core/base/interpreter.lua')
-rw-r--r--xmake/core/base/interpreter.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua
index 029fe3e60..01d76973e 100644
--- a/xmake/core/base/interpreter.lua
+++ b/xmake/core/base/interpreter.lua
@@ -119,7 +119,7 @@ function interpreter._fetch_root_scope(root)
for scope_kind_and_name, _ in pairs(root or {}) do
-- is scope_kind@@scope_name?
- scope_kind_and_name = scope_kind_and_name:split("@@")
+ scope_kind_and_name = scope_kind_and_name:split("@@", {plain = true})
if #scope_kind_and_name == 2 then
local scope_kind = scope_kind_and_name[1]
local scope_name = scope_kind_and_name[2]
@@ -1413,7 +1413,7 @@ function interpreter:api_define(apis)
-- get api function
local apiscope = nil
local funcname = nil
- apifunc = apifunc:split('.')
+ apifunc = apifunc:split('.', {plain = true})
assert(apifunc)
if #apifunc == 2 then
apiscope = apifunc[1]
@@ -1470,7 +1470,7 @@ function interpreter:api_builtin_set_xmakever(minver)
end
-- parse minimum version
- local minvers = minver:split('.')
+ local minvers = minver:split('.', {plain = true})
if not minvers or #minvers ~= 3 then
os.raise("[nobacktrace]: set_xmakever(\"%s\"): invalid version format!", minver)
end
@@ -1479,7 +1479,7 @@ function interpreter:api_builtin_set_xmakever(minver)
local minvers_num = minvers[1] * 100 + minvers[2] * 10 + minvers[3]
-- parse current version
- local curvers = xmake._VERSION_SHORT:split('.')
+ local curvers = xmake._VERSION_SHORT:split('.', {plain = true})
-- make current numerical version
local curvers_num = curvers[1] * 100 + curvers[2] * 10 + curvers[3]