lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

A thing for the constraints department?

(a flashback: I was suggesting earlier in 2006 an ability to add type constraints to any Lua parameters, and/or variables. That would be a common solution for this, but basically more than you're asking since you'd only need to check the data coming from those files)

Norman Ramsey kirjoitti 29.12.2006 kello 0.20:

Recently I've been playing around with Lua and XML via the
nice Expat embedding (packages lxp and lxp.lom).  It occurred
to me that I now manage a lot of my data using Lua, and I frequently
do some stupid thing like misspell a key name in a table or somesthing
like that.  Has anybody thought about the moral equivalent of
XML DTD or XML Schema for describing valid Lua data?  I would
love to be able to put my hand-written data through such a validator.
(And surely it would also be useful in the context of toLua, SWIG,
and such tools.)