A pure-Go toolkit for CFX Lua 5.4 featuring a hand-written lexer, Pratt parser, two-level minifier, and diagnostics reporter.
- Lexer — hand-written, supports all Lua 5.4 tokens plus CFX extensions (backtick hash strings, compound assignments, safe navigation)
- Parser — Pratt parser producing a full AST with error recovery
- Scope analysis — tracks locals, upvalues, and globals; globals are never renamed
- Level 1 minifier — token-stream based, no parsing required (~50 MB/s target)
- Level 2 minifier — AST-based with variable renaming, dead code elimination, and constant folding
- Diagnostics — structured errors with terminal, JSON, and SARIF output
go build ./cmd/cfxminify
go build ./cmd/cfxcheckgo test ./...Proprietary — all rights reserved.