From fff8e91238aaa9af95bc5078a0cc8e4c05f2accc Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 31 Aug 2011 18:02:23 -0400 Subject: Added Lua debug.traceback documentation. --- modules/lua/api | 1 + modules/lua/lua.luadoc | 7 +++++++ modules/lua/tags | 1 + 3 files changed, 9 insertions(+) (limited to 'modules/lua') diff --git a/modules/lua/api b/modules/lua/api index 031c0d97..e60ed9d9 100644 --- a/modules/lua/api +++ b/modules/lua/api @@ -1546,6 +1546,7 @@ token lexer.token(name, patt)\nCreates an LPeg capture table index with the name tonumber _G.tonumber(e [, base])\nTries to convert its argument to a number. If the argument is already a number\nor a string convertible to a number, then `tonumber` returns this number;\notherwise, it returns nil. An optional argument specifies the base to interpret\nthe numeral. The base may be any integer between 2 and 36, inclusive. In bases\nabove 10, the letter '`A`' (in either upper or lower case) represents 10,\n'`B`' represents 11, and so forth, with '`Z`' representing 35. In base 10\n(the default), the number can have a decimal part, as well as an optional\nexponent part (see ยง2.1). In other bases, only unsigned integers are accepted.\n tostring _G.tostring(e)\nReceives an argument of any type and converts it to a string in a\nreasonable format. For complete control of how numbers are converted, use\n`string.format`. If the metatable of `e` has a `"__tostring"` field, then\n`tostring` calls the corresponding value with `e` as argument, and uses the\nresult of the call as its result.\n touch lfs.touch(filepath [, atime [, mtime]])\nSet access and modification times of a file. This function is a bind to utime\nfunction. The first argument is the filename, the second argument (atime)\nis the access time, and the third argument (mtime) is the modification\ntime. Both times are provided in seconds (which should be generated with\nLua standard function os.time). If the modification time is omitted, the\naccess time provided is used; if both times are omitted, the current time\nis used. Returns true if the operation was successful; in case of error,\nit returns nil plus an error string.\n +traceback debug.traceback([thread, ] [message] [, level])\nReturns a string with a traceback of the call stack. An optional `message`\nstring is appended at the beginning of the traceback. An optional `level`\nnumber tells at which level to start the traceback (default is 1, the function\ncalling `traceback`).\n transpose_chars _m.textadept.editing.transpose_chars()\nTransposes characters intelligently. If the caret is at the end of a line,\nthe two characters before the caret are transposed. Otherwise, the characters\nto the left and right are.\n try_encodings io.try_encodings [table]\nList of encodings to try to decode files as after UTF-8.\n try_to_autocomplete_end _m.lua.try_to_autocomplete_end()\nTries to autocomplete Lua's 'end' keyword for control structures like 'if',\n'while', 'for', etc.\n@see control_structure_patterns\n diff --git a/modules/lua/lua.luadoc b/modules/lua/lua.luadoc index 7990f6e1..d43950b1 100644 --- a/modules/lua/lua.luadoc +++ b/modules/lua/lua.luadoc @@ -1076,6 +1076,13 @@ function debug.setmetatable(object, table) end -- with the given index. Otherwise, it returns the name of the upvalue. function debug.setupvalue(func, up, value) end +--- +-- Returns a string with a traceback of the call stack. An optional `message` +-- string is appended at the beginning of the traceback. An optional `level` +-- number tells at which level to start the traceback (default is 1, the +-- function calling `traceback`). +function debug.traceback([thread,] [message] [,level]) end + -- External libraries. -- LPeg. diff --git a/modules/lua/tags b/modules/lua/tags index 2bb178b2..4ba58f3f 100644 --- a/modules/lua/tags +++ b/modules/lua/tags @@ -1588,6 +1588,7 @@ token _ 0;" f class:lexer tonumber _ 0;" f tostring _ 0;" f touch _ 0;" f class:lfs +traceback _ 0;" f class:debug transpose_chars _ 0;" f class:_m.textadept.editing try_encodings _ 0;" t class:io try_to_autocomplete_end _ 0;" f class:_m.lua -- cgit v1.2.3