mehen supports nine source languages and Markdown. Per-file language detection is by extension, and the matching analyzer crate owns parsing and metric interpretation. Each language uses the parser that gives mehen the best semantic coverage for that ecosystem.Documentation Index
Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt
Use this file to discover all available pages before exploring further.
Source languages
| Language | Extensions | Parser |
|---|---|---|
| Python | .py | Ruff (ruff_python_parser + ruff_python_ast) |
| TypeScript / JavaScript | .ts, .mts, .cts, .js, .mjs, .cjs | Oxc (oxc_parser) |
| TSX / JSX | .tsx, .jsx | Oxc (oxc_parser) |
| PHP | .php | Mago (mago-syntax) |
| Ruby | .rb | Prism (ruby-prism) |
| Rust | .rs | ra_ap_syntax (rust-analyzer’s syntax library) |
| Go | .go | tree-sitter-go |
| Kotlin | .kt, .kts | tree-sitter-kotlin-sg |
| C | .c, .h | tree-sitter-c |
| PowerShell | .ps1, .psm1, .psd1 | tree-sitter-pwsh |
TypeScript is a superset of JavaScript, so mehen analyzes
.js / .mjs / .cjs through the Oxc
TypeScript front-end and .jsx through Oxc’s TSX front-end.Why these parsers
- Ruff parses Python with full support for current syntax (3.13/3.14 features, f-strings,
match/case, exception groups, async constructs) and exposes a typed AST plus a semantic model. - Oxc is a JavaScript/TypeScript toolchain in Rust and one of the fastest TS parsers in
production. It handles decorators, class fields, parameter properties, JSX,
satisfies,using, and dynamic import natively. - Mago is a PHP toolchain in Rust. It understands attributes, promoted properties, enums, traits,
anonymous classes, readonly members, null-safe calls, and
matchexpressions out of the box. - Prism is the official Ruby parser maintained by the Ruby core team. It covers blocks, lambdas, numbered parameters, modifier conditionals, rescue modifiers, endless methods, pattern matching, and safe navigation.
ra_ap_syntaxis the syntax tree library used by rust-analyzer; it gives mehen exactly the syntactic granularity rust-analyzer uses for its own analyses.- Tree-sitter is mehen’s pick for Go, Kotlin, C, and PowerShell, where its grammar quality and ecosystem maturity make it the best fit.
Documentation
| Format | Extensions | Parser |
|---|---|---|
| Markdown | .md, .markdown, .mdown, .mkd, .mkdn, .mdx | pulldown-cmark |
SQL (preview)
A dedicated SQL analyzer (mehen-sql) is on the roadmap with its own metric family — query-block
structure, CTE graphs, join graphs, predicate complexity, object-touch risk, dialect portability, and
an SQL-flavored Halstead. See SQL metrics overview for the design.