Skip to main content

Module lang

Module lang 

Source
Expand description

Language-specific parsing and resolution behind a common trait.

Each supported language implements LanguageSupport to parse import statements and resolve specifiers to filesystem paths.

Modules§

python
Python support: tree-sitter parser with source-root and virtualenv resolution.
typescript
TypeScript/JavaScript support: OXC parser with node_modules resolution.

Structs§

ParseError
Opaque error from a language parser.
ParseResult
All imports extracted from a single source file.
RawImport
A single import extracted from source code before resolution.

Enums§

ProjectKind
Which language ecosystem a project belongs to.

Traits§

LanguageSupport
Language-specific import parsing and specifier resolution.

Functions§

detect_project
Detect the project kind from the entry file extension, then walk up to find the matching project root marker. Returns None for unsupported file extensions.