Skip to content

rusefi/luaformatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LUAFORMATTER

luaformatter is a lua source code formatter written in Java by Neoe.

It use a handcrafted parser as little as 300 lines of Java code.

How to use

  • install java (JRE from java.com) if not installed
  • run.cmd (java -jar luaformatter.jar ), args:
-o  -- overwrite source
-e<ENCODING> -- use ENCODING
input-files-or-dirs

Files cause formatting error will be picked up automatically and save to .fmt-err.lua files.

Why

I have tried several lua formatters online but no one work good, so I wrote this really works thing.

What should a formatter be?

  • Result should still compiles.
  • A -format-> B -format(again)-> C, then B should be same with C.
  • Result should be beautiful to read.

About

A Lua source formatter tool written in Java (really works)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.8%
  • Batchfile 0.2%