A lexer, parser and AST for Monkey C. See monkey-c-parser
A full representation of the Monkey C AST to support future development of
tools, for now primarily the monkey-c-formatter.
A formatter to format Monkey C code. See monkey-c-formatter
The main reason this project was created. An opinionated zero-config formatter that produces a deterministic formatting experience similar to ruff and rustfmt.
Note
I'd love any input and testing on the formatter. Both help finding bugs and inconsistencies but also input on the formatting algorithm. Please create an issue for any bug or feature request.
A linter for Monkey C with machine-applicable fixes. See
monkey-c-linter
Rules walk the AST produced by monkey-c-parser and emit diagnostics with
optional --fix suggestions that patch source byte ranges directly. The
linter is independent of the formatter and fixes don't reformat unrelated code.
Run the formatter after --fix if you want whitespace normalised.
For transparency: this project is being built with assistance of AI. However, all implementations are suggested by me, discussed, and reviewed before being committed. My focus is still to build the best tools possible and know and understand 100% of the codebase. Although not every line of code is written by hand, I want to avoid slop.
This repository is licensed under the MIT License
