[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] lua code formatter (lcf) 5.3-2
- From: Martin <eden_martin_fuhrspam@...>
- Date: Tue, 26 Sep 2017 05:11:46 +0100
Hello list!
I've updated Lua code formatter, so now it keeps comments by default.
Requirements: Lua 5.3
License: GPLv3
Installation: sudo luarocks install lcf
Usage: lua.reformat <f_in> <f_out>
Project page: https://github.com/martin-eden/lua_code_formatter
Rockspecs: https://github.com/martin-eden/lua_code_formatter.rockspecs
Version: 5.3-2
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.
]]
-- Martin