youcankillmenow;)

Former-commit-id: 906db790ab715ecdb1b7b9df11c74bc188afceb0
Former-commit-id: c229422f3faeafe31c44870183fa753564b32fa7
This commit is contained in:
Song Minjae
2016-12-12 20:35:00 +09:00
parent 3fa4f61eec
commit 870c9b36ff
29 changed files with 512 additions and 20 deletions

View File

@@ -0,0 +1,34 @@
-- TBASIC extension
-- these are utilities. Do not touch these lines
local __assert = _TBASIC.__assert
local __assertlhand = _TBASIC.__assertlhand
local __assertrhand = _TBASIC.__assertrhand
local __checknumber = _TBASIC.__checknumber
local __checkstring = _TBASIC.__checkstring
local __readvar = _TBASIC.__readvar
local __resolvevararg = _TBASIC.__resolvevarar
local vararg = -13 -- magic
-- end of utilities
-- these are the sample code for defining your own words
--[[
-- actual function that does the job
local function _fnupgoer(n)
print("Up-goer "..__checknumber(n).." goes up!")
end
-- add the word UPGOER to word list
table.insert(_TBASIC._FNCTION, "UPGOER")
-- add the actual function '_fnupgoer' and its number of arguments (1) to
-- '_TBASIC.LUAFN'. 'UPGOER' part should match with the word you just
-- inserted to _TBASIC._FNCTION.
_TBASIC.LUAFN.UPGOER = {_fnupgoer, 1}
]]
-- little debugger's blessing
local function _fnenableluatrace() _TBASIC.SHOWLUAERROR = true end
table.insert(_TBASIC._FNCTION, "LUATRACEON")
_TBASIC.LUAFN.LUATRACEON = {_fnenableluatrace, 0}