lua-users home
lua-l archive

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


One thought: it would help to start the README with some interesting and relevant examples, examples that show the motivation for the package.

(The tests remind me of Common Lisp’s format, which also supports things like conditionals and iterators. Not sure how many people have seen something like that though?)

On Aug 23, 2023 at 6:19:32 AM, Александр Машин <alex.mashin@gmail.com> wrote:
Dear all,

I wrote an alpha version of a table formatting tool, called FormatterII,
based on LPEG and coroutines, which formats a Lua table according to
a format string. Among other things, it can select table fields with
keys or values matching a regular _expression_ (there are several
flavours, including Lua, Re and some others provided by lrexlib).

The ultimate purpose is to use it as an alternative templating engine
in MediaWiki: I want to get rid of {{{param1|{{{Param1|{{{param
1|{{{Param 1|}}}}}}}}}}}} chains.

Criticism is welcome.

The library is here: https://github.com/alex-mashin/FormatterII.

Alexander Mashin