Hello!

Here is the rockspec for literal 0.1: 

https://raw2.github.com/mpeterv/literal/0.1/rockspecs/literal-0.1-1.rockspec

literal(https://github.com/mpeterv/literal) is a pure Lua library for 
evaluating literal expressions without safety issues of using load|loadstring 
on untrusted data. It can mimic grammar of Lua 5.1 or Lua 5.2. It provides 
error messages similar to those of Lua compiler, too. 

    local t = literal.eval([[ {foo = "bar"} ]])
    print(t.foo) -- bar

It also provides a way to load configuration files consisting of several 
assignments: 

    local t = literal.eval_config([[
    foo = "bar"
    -- comments are discarded
    baz = -0.8E+4
    ]])
    print(t.baz) -- -8000

LDoc-generated documentation can be viewed online here: 

http://mpeterv.github.io/literal/

Another thing which may be useful: as I tried to comply with good development 
practices I wrote a small script for setting up automated testing with Lua 5.1, 
Lua 5.2 and LuaJIT 2.0 on travis-ci.org: 

https://github.com/mpeterv/literal/blob/0.1/.travis_setup.sh

And this is the way I use it: 

https://github.com/mpeterv/literal/blob/0.1/.travis.yml

Best regards, 

Peter

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to