DumbLuaParser
Lua parsing library capable of optimizing and minifying code.
Install / Use
/learn @ReFreezed/DumbLuaParserREADME
Dumb Lua Parser
Dumb Lua Parser is a library for tokenizing Lua code or creating ASTs (Abstract Syntax Trees) and converting the data back to Lua. It can also optimize and minify code.
The library is a single Lua file with no dependencies other than Lua itself. It works with Lua 5.1, 5.2, 5.3 and 5.4. LuaJIT should work too. MIT license.
Download the latest stable release here or, if you're cloning the repository, checkout the last commit with a version tag. Also available on LuaRocks.
Basic usage
local parser = require("dumbParser")
local tokens = parser.tokenizeFile("cool.lua")
local ast = parser.parse(tokens)
parser.simplify(ast)
parser.printTree(ast)
local lua = parser.toLua(ast, true)
print(lua)
Check out examples.lua for some examples.
Documentation
See the website or the top of the source file.
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
