lua-users home
lua-l archive

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


On Fri, Aug 12, 2011 at 11:58 AM, Pierre Chapuis <catwell@archlinux.us> wrote:
> I don't see a reason why this wouldn't work with Lua. It is
> probably possible to make a parser that takes valid Lua code
> and returns a canonical representation for it.

Yes, it would not be difficult, if you wanted to impose a sensible
style. Certainly possible exactly because there is that information
already!  It is a common problem with beginner programmers that they
have no sense of indentation and such a little tool would be
educational.

A good editor helps, of course; any half-decent one will maintain a
given indentation once started. And a truly great editor would
rearrange on the fly and _not_ be irritating about it!

steve d.