Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Kampfkarren/full-moon
A lossless Lua 5.1 parser
https://github.com/Kampfkarren/full-moon
hacktoberfest
Last synced: 2 months ago
JSON representation
A lossless Lua 5.1 parser
- Host: GitHub
- URL: https://github.com/Kampfkarren/full-moon
- Owner: Kampfkarren
- License: mpl-2.0
- Created: 2019-03-25T23:24:22.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-07T19:40:46.000Z (9 months ago)
- Last Synced: 2024-05-01T17:14:15.783Z (8 months ago)
- Topics: hacktoberfest
- Language: Rust
- Homepage:
- Size: 2.69 MB
- Stars: 344
- Watchers: 8
- Forks: 43
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
A lossless Lua 5.1 / 5.2 / 5.3 / 5.4 / [Luau](https://luau-lang.org/) parser written in Rust.
## Lossless?
Full Moon preserves comments, whitespace, style choices, etc. With Full Moon, you're able to convert your Lua code into an AST and a syntax tree and convert it back to the original code exactly.
Using Full Moon, you'll be able to modify the AST directly and re-export it back to Lua, all while preserving the style in which you write.
## Why?
Full Moon is usable in projects such as:
- Static analysis (like Luacheck or [rust-clippy](https://github.com/rust-lang/rust-clippy))
- Static typing (like TypeScript)
- Automatic mass code refactoring (like [jscodeshift](https://github.com/facebook/jscodeshift))
- Automatic code formatting (like [rustfmt](https://github.com/rust-lang/rustfmt))
- An [LSP Server](https://microsoft.github.io/language-server-protocol/) for Lua## Inspiration
Full Moon is heavily inspired by [LPGhatguy's mab](https://github.com/LPGhatguy/mab/) and by the possibilities brought on by [benjamn's recast](https://github.com/benjamn/recast).