mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 17:59:30 +00:00
Added cancheck; candran.compile, .make and .preprocess returns nil, err instead of throwing an error; can and canc error output should now be similar to Lua
This commit is contained in:
parent
dc19ac56a9
commit
1de0aafa5b
9 changed files with 412 additions and 226 deletions
|
|
@ -183,7 +183,7 @@ return function(code, ast, options)
|
|||
return "table.unpack("..list..(i and (", "..i..(j and (", "..j) or "")) or "")..")"
|
||||
end
|
||||
local APPEND = (t, toAppend) -- append values "toAppend" (multiple values possible) to t
|
||||
return "do"..indent().."local a = table.pack("..toAppend..")"..newline().."table.move(a, 1, a.n, #"..t.."+1, "..t..")"..unindent().."end"
|
||||
return "do"..indent().."local "..var("a").." = table.pack("..toAppend..")"..newline().."table.move("..var("a")..", 1, "..var("a")..".n, #"..t.."+1, "..t..")"..unindent().."end"
|
||||
end
|
||||
local CONTINUE_START = () -- at the start of loops using continue
|
||||
return "do"..indent()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue