Skip to main content

Module language

Module language 

Expand description

Per-language tree-sitter loader for clone fingerprinting.

Mirrors the dispatch shape of crate::complexity::language::Tier1Language but builds raw tree_sitter::Parser instances so the AST walker in fingerprint can traverse Node directly. We do not go through codelore-rca’s FuncSpace because FuncSpace doesn’t carry the raw tree_sitter::Node (its lifetime is tied to the parser’s tree, which FuncSpace summarises into start_line/end_line + metrics only).

Enums§

CloneLanguage
Tier-1 languages CodeLore clone-detects. Mirrors crate::complexity::language::Tier1Language for extension recognition, but splits TSX out as its own variant: tree-sitter-typescript ships a dedicated LANGUAGE_TSX grammar for .tsx files (the plain LANGUAGE_TYPESCRIPT grammar errors on JSX tags). Complexity rolls TSX into TypeScript because codelore-rca’s Coleman MI scoring is the same for both — clone fingerprinting can’t make that simplification because it parses the raw AST and JSX tags become real node kinds.