Skip to main content

Module language

Module language 

Source
Expand description

Language registry for code parsing

This module provides a registry of supported programming languages, each with its own tree-sitter grammar, query patterns, and extraction rules.

Languages are registered at compile time based on feature flags. To add a new language, add one line to the define_languages! invocation and create a language module file (see existing language modules for examples).

§Feature Flags

  • lang-rust - Rust support (enabled by default)
  • lang-python - Python support (enabled by default)
  • lang-typescript - TypeScript support (enabled by default)
  • lang-javascript - JavaScript support (enabled by default)
  • lang-go - Go support (enabled by default)
  • lang-c - C support (enabled by default)
  • lang-java - Java support (enabled by default)
  • lang-all - All languages

Structs§

LanguageDef
A language definition with all parsing configuration
LanguageRegistry
Registry of all supported languages
ParseChunkTypeError
Error returned when parsing an invalid ChunkType string
ParseLanguageError
Error returned when parsing an invalid Language string

Enums§

ChunkType
Type of code element extracted by the parser
Language
Supported programming languages
SignatureStyle
How to extract function signatures

Statics§

REGISTRY
Global language registry