MCPcopy Index your code
hub / github.com/Kampfkarren/full-moon

github.com/Kampfkarren/full-moon @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
685 symbols 1,810 edges 40 files 306 documented · 45%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<h1>
    Full Moon


    <a href="https://crates.io/crates/full-moon"><img src="https://img.shields.io/crates/v/full-moon.svg"></a>
</h1>

A lossless Lua 5.1 / 5.2 / 5.3 / 5.4 / Luau / CfxLua 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) - Static typing (like TypeScript) - Automatic mass code refactoring (like jscodeshift) - Automatic code formatting (like rustfmt) - An LSP Server for Lua

Inspiration

Full Moon is heavily inspired by LPGhatguy's mab and by the possibilities brought on by benjamn's recast.

Extension points exported contracts — how you extend this code

Node (Interface)
Used to represent nodes such as tokens or function definitions This trait is sealed and cannot be implemented for types [11 …
full-moon/src/node.rs
StructGenerator (Interface)
(no doc) [5 implementers]
full-moon-derive/src/derive.rs
Sealed (Interface)
(no doc) [17 implementers]
full-moon/src/private.rs
MatchEnumGenerator (Interface)
(no doc) [4 implementers]
full-moon-derive/src/derive.rs
Visit (Interface)
(no doc) [26 implementers]
full-moon/src/visitors.rs
DeriveGenerator (Interface)
(no doc) [2 implementers]
full-moon-derive/src/derive.rs
VisitMut (Interface)
(no doc) [24 implementers]
full-moon/src/visitors.rs
EnumGenerator (Interface)
(no doc) [2 implementers]
full-moon-derive/src/derive.rs

Core symbols most depended-on inside this repo

unwrap
called by 168
full-moon/src/ast/parser_structs.rs
push
called by 132
full-moon/src/ast/punctuated.rs
consume
called by 108
full-moon/src/ast/parser_structs.rs
token_error
called by 88
full-moon/src/ast/parser_structs.rs
current
called by 77
full-moon/src/ast/parser_structs.rs
is_symbol
called by 71
full-moon/src/tokenizer/structs.rs
iter
called by 46
full-moon/src/ast/punctuated.rs
create
called by 42
full-moon/src/tokenizer/lexer.rs

Shape

Method 436
Function 120
Class 85
Enum 34
Interface 10

Languages

Rust100%

Modules by API surface

full-moon/src/ast/mod.rs157 symbols
full-moon/src/ast/luau.rs122 symbols
full-moon/src/ast/parsers.rs59 symbols
full-moon/src/tokenizer/structs.rs42 symbols
full-moon/src/ast/punctuated.rs35 symbols
full-moon/src/tokenizer/lexer.rs33 symbols
full-moon/src/ast/versions.rs25 symbols
full-moon/src/ast/parser_structs.rs25 symbols
full-moon/tests/visitors.rs18 symbols
full-moon-derive/src/node.rs15 symbols
full-moon-derive/src/derive.rs14 symbols
full-moon/src/ast/lua52.rs13 symbols

For agents

$ claude mcp add full-moon \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact