1 Star 1 Fork 0

羽名 / c2al

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
load.lua 710 Bytes
一键复制 编辑 原始数据 按行查看 历史
羽名 提交于 2018-02-22 17:16 . 更新测试版本2
function GetFileDir(f)
f = string.reverse(f);
local pos = f:find('\\');
local pos2 = f:find('/');
if(pos and pos2)then
if(pos>pos2)then pos = pos2;end;
elseif(pos==nil)then
pos = pos2;
end
if(pos==nil)then pos = 1;end;
return string.reverse(f:sub(pos));
end
function ScriptDir()
local info = debug.getinfo(ScriptDir);
local dir = info.source;
dir = dir:sub(2);
return GetFileDir(dir);
end
function LoadTu(fname)
local f = io.open(fname,"rb");
local s = f:read("*a");
parse(s);
f:close();
end
package.path = package.path .. ';' .. ScriptDir().."lib/?.lua"
print(require('base'));
print(require('parser'));
--LoadTu(arg[1]);
Lua
1
https://gitee.com/uyami/c2al.git
git@gitee.com:uyami/c2al.git
uyami
c2al
c2al
master

搜索帮助