Real-world enterprise systems are rarely written in a single language. They combine modern microservices (Python, Go, TypeScript), legacy core monoliths (Delphi, Object Pascal, Java, C++), and enterprise business systems.
nexcoder-code-intel features a modular AST parser architecture capable of extracting symbols, signatures, call graphs, and UI bindings across multiple languages.
| Language | Parser Technology | Symbols Extracted | Specific Capabilities |
|---|---|---|---|
| Python | Tree-sitter | Modules, classes, methods, functions, decorators, imports | Async/await, type annotations, enclosing class context |
| TypeScript / JavaScript | Tree-sitter | Classes, interfaces, methods, arrow functions, exports | Type aliases, JSX/TSX components, default exports |
| Go | Tree-sitter | Packages, structs, interfaces, methods, functions | Receiver types, struct tags, goroutine invocations |
| Java | Tree-sitter | Packages, classes, interfaces, records, methods, annotations | Generic type parameters, Spring/Jakarta annotations |
| C / C++ | Tree-sitter | Namespaces, classes, structs, functions, templates | Header/implementation separation, macros |
| Rust | Tree-sitter | Modules, structs, traits, impl blocks, functions, macros | Trait implementations, visibility qualifiers |
| Object Pascal / Delphi | Custom Lexer & AST | Units, interfaces, implementations, classes, methods, DFM forms | DFM component bindings, Win1252 strings, memory leak audit |
- C#: Tree-sitter parser for
.csfiles (planned). - COBOL: Parser for copybooks and legacy routines (planned).
- OutSystems: Parser for
.omlmetadata (planned).
Regardless of source language, nexcoder-code-intel maps parsed entities into a unified Symbol model:
class Symbol(BaseModel):
id: str # Unique fully-qualified symbol identifier
name: str # Symbol identifier name (e.g. "charge_card")
symbol_type: SymbolType # FUNCTION, METHOD, CLASS, INTERFACE, ENUM, VARIABLE
file_path: str # Relative file path inside repository
line_start: int # 1-indexed start line
line_end: int # 1-indexed end line
signature: str # Parameter list, return types, qualifiers
enclosing_symbol: str | None # Parent class or module ID
docstring: str | None # Extracted documentation or comment header
language: str # Standard language identifierThis unified representation enables cross-language RAG, GraphRAG community detection, and consistent agent reasoning.
Legacy systems written in Delphi (e.g. Delphi 7, Delphi 2007, modern RAD Studio) present unique parsing challenges that standard off-the-shelf parsers fail to handle:
- Interface vs Implementation Separation: Method declarations in the
interfacesection must be correlated with implementations in theimplementationsection. - DFM Form Bindings: Event handlers (e.g.
Button1Click) are declared in code but wired to buttons, grids, and queries inside binary or text.dfmform definition files. - Case-Insensitive Syntax: Object Pascal is case-insensitive, requiring normalized symbol IDs.
nexcoder-code-intel includes a specialized parser:
from nexcoder_code_intel.parsers import DelphiParser
parser = DelphiParser()
symbols = parser.parse_file("uBillingService.pas", dfm_content=dfm_text)
for sym in symbols:
print(f"[{sym.symbol_type.value}] {sym.name} (Lines {sym.line_start}-{sym.line_end})")
if sym.ui_bindings:
print(f" Bound to UI components: {sym.ui_bindings}")To add support for a new language:
- Implement the
BaseParserinterface innexcoder_code_intel.parsers. - Map the language's Tree-sitter grammar node types to
SymbolType. - Extract enclosing context and typed signatures.
- Register the parser in
ParserRegistry.