[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] lua code formatter (lcf) 5.3-2
- From: Vadim Peretokin <vperetokin@...>
- Date: Tue, 26 Sep 2017 04:35:08 +0000
I'd be really interested in a Lua 5.1 version of this!
I've updated Lua code formatter, so now it keeps comments by default.
Requirements: Lua 5.3
Installation: sudo luarocks install lcf
Usage: lua.reformat <f_in> <f_out>
Project page: https://github.com/martin-eden/lua_code_formatter
That change required loseless Lua code parser. So now it's almost
trivial to write code highlighting and such things. For those who
interested, two shell commands provided: "lua.get_ast" and
"lua.get_formatter_ast". Both have format <f_in> <f_out> and
create file with table which represents raw AST from parser and
structured/simplified AST that is used by code formatter.
Feedback is welcome.
There was some wishes from previous release like
* do not export global functions
* support command-line pipes
* use standalone lexer
They are not satisfied. Some I just can't implement, some I tend
to keep because it's based on my code which I can easily reshape.