fixed loadvenus

This commit is contained in:
theFox6 2020-02-18 15:13:59 +01:00
parent ea9228f5e1
commit 32afec0b36
Signed by: theFox6
GPG Key ID: C884FE8D3BCE128A
3 changed files with 29 additions and 1 deletions

View File

@ -442,7 +442,7 @@ function parser.tl_venus_file(file)
end
function parser.loadvenus(file,env)
local fc = parser.translate_venus(file)
local fc = parser.tl_venus_file(file)
if env then
return loadstring(fc,"@"..file,"t",env)
else

View File

@ -189,4 +189,18 @@ assert(j ==32)
j .=" test"
assert(j == "32 test")
local tt = {
{"hello", "there"},
{"venus", "test"}
}
local fn concatsub(t) {
local ret = {}
foreach el in t {
table.insert(ret,table.concat(el," "))
}
return ret
}
assert(vp_util.dftc(concatsub(tt),{"hello there", "venus test"}))
print("venus test end")

View File

@ -189,4 +189,18 @@ assert(j ==32)
j = j .." test"
assert(j == "32 test")
local tt = {
{"hello", "there"},
{"venus", "test"}
}
local function concatsub(t)
local ret = {}
for _, el in pairs(t ) do
table.insert(ret,table.concat(el," "))
end
return ret
end
assert(vp_util.dftc(concatsub(tt) ,{"hello there", "venus test"}))
print("venus test end")