Repository navigation
7 tooling cli lsp and editor
Source: https://deepwiki.com/PonvasanthPon/TransCompilator/7-tooling-cli-lsp-and-editor
Relevant source files
The following files were used as context for generating this wiki page:
This parent page provides a high-level overview of the user-facing tools within the TransCompilator (tc_r1) workspace. These tools bridge the gap between human-authored English source files (.eng) and the deterministic compiler pipeline, providing a command-line interface driver, a Language Server Protocol (LSP) server, a terminal-based editor, and IDE integration configurations.
For deep technical details, refer to the following child pages:
The user-facing tools are structured as discrete workspace binaries and library crates that interface directly with the front-end, middle-end, and back-end compiler pipelines without relying on external machine learning or runtime frameworks.
graph TD
CLI["tc-cli"] --> Main["crates/tc-cli/src/main.rs"]
LSP["tc-lsp"] --> Server["crates/tc-lsp"]
Editor["tc-editor"] --> EditorMain["crates/tc-editor"]
Main --> Semantics["tc-semantics"]
Main --> IR["tc-ir"]
Main --> Codegen["tc-codegen-x86"]
subgraph "NaturalLanguageSpace"
CLI
LSP
Editor
end
subgraph "CodeEntitySpace"
Main
Server
EditorMain
Semantics
IR
Codegen
end
Sources: Cargo.lock, Cargo.toml, crates/tc-cli/src/main.rs
The tc command-line driver (located in crates/tc-cli) serves as the primary orchestration interface for compiling, executing, interpreting, tracing, and auditing TransCompilator programs. It parses command-line arguments, manages source and import resolution, and invokes the appropriate backend or reference interpreter.
The driver supports subcommands such as build, run, interp, trace, and paraphrase, alongside maintenance flags like --audit and --selftest crates/tc-cli/src/main.rs:22-47. Module and import resolution inspects local directories and standard library paths to stitch multi-file English programs together crates/tc-cli/src/main.rs:128-185.
graph LR
Args["env::args"] --> Match["main"]
Match -->|build| Build["run_build"]
Match -->|run| Run["run_run"]
Match -->|interp| Interp["run_interp"]
Match -->|trace| Trace["run_trace"]
Match -->|paraphrase| Paraphrase["run_paraphrase"]
Match -->|audit| Audit["run_audit"]
Match -->|selftest| Selftest["run_selftest"]
Sources: crates/tc-cli/src/main.rs
For details, see tc Command-Line Driver.
The tc-lsp crate implements a Language Server Protocol backend over JSON-RPC transport, enabling real-time IDE diagnostics, semantic token generation, hover information, symbol completion, go-to-definition, and document symbol navigation for English source files. It maintains an in-memory document store and continuously feeds files through the syntax, semantic, and type-checking pipelines.
Sources: Cargo.lock
For details, see Language Server (tc-lsp).
The tc-editor crate (running via the r1-editor binary) provides a dedicated terminal-based text editor tailored for editing structured English source code. It features a custom text buffer representation, keybinding dispatch, a terminal UI rendering layer, syntax highlighting, an integrated compilation and execution runner, and robust terminal control primitives.
Sources: Cargo.lock, Makefile
For details, see Terminal Editor (r1-editor).
The Zed integration (tc-eng-extension and associated scripts like install_zed_config.sh) bridges the TransCompilator toolchain with the Zed code editor. It handles settings and tasks merging, enforces monochrome semantic token rules, and applies serif typography rules suited for reading and writing structured English codebases.
Sources: Cargo.lock, Makefile
For details, see Zed Editor Integration.
The TransCompilator Project