diff --git a/assert-gooder.lua b/assert-gooder.lua index 706488c..df88739 100644 --- a/assert-gooder.lua +++ b/assert-gooder.lua @@ -1,3 +1,15 @@ +--- # Assert Gooder +-- +-- Supercharged assert replacement. +-- +-- Lua Library that replaces the default `assert` function with one that can +-- emit improved error messages. The improved assert function parses the +-- assert condition, inspects the state of the program and emits an improved +-- error message. +-- +-- @author Jon Michael Aanes (jonjmaa@gmail.com) + +local _VERSION = '0.5.2' local lexer = assert(require((... and select('1', ...):match('.+%.') or '')..'lua_lang'), '[assert-gooder]: Could not load vital library: lua_lang') local shunting_yard = assert(require((... and select('1', ...):match('.+%.') or '')..'Parser'), '[assert-gooder]: Could not load vital library: Parser') @@ -764,4 +776,3 @@ return function (condition, format, ...) -- Throw error message error(table.concat(l, ''), 2) end - diff --git a/init.lua b/init.lua index d611805..3ba52f8 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1 @@ -local _VERSION = '0.5.2' - -local assert_gooder = assert(require((... and select('1', ...):match('.+')..'.' or '')..'assert-gooder'), '[assert-gooder]: Could not load vital library: assert-gooder') -assert_gooder._VERSION = _VERSION -return assert_gooder +return assert(require((... and select('1', ...):match('.+')..'.' or '')..'assert-gooder'), '[assert-gooder]: Could not load vital library: assert-gooder')