leafo / tableshape

Test the shape or structure of a Lua table, inspired by React.PropTypes & LPeg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Print node description with tostring()

sveyret opened this issue · comments

Currently, nodes are printing their description in case of check failure. That would be good to be able to access this description at will, for example, overriding the __tostring() method of the types metatable, so that tostring(my_type) would display something more interesting than table <xxxxx>.

Thank you.

commented

good suggestion, will be available in next release