Add language tools package

This commit is contained in:
2026-07-09 18:34:41 +09:00
parent ac99c4cb4e
commit 0e2a7b35d2
20 changed files with 1434 additions and 16 deletions
+19
View File
@@ -39,6 +39,24 @@ The JSR package is `@hare/decodal-wasm`.
The generated files in `packages/decodal-wasm/` are committed so the site can build without requiring every consumer to run `wasm-pack` first.
The WebAssembly package is for execution, not syntax highlighting.
## Language tools
Source-level tooling lives in the Rust language tools crate and its generated JavaScript/WebAssembly package.
This component is responsible for operations that must preserve source text details such as comments and whitespace.
Important paths:
```text
crates/decodal-language-tools/
packages/decodal-language-tools/
```
The npm package is `decodal-language-tools`.
The JSR package is `@hare/decodal-language-tools`.
The current language tools package exposes the formatter.
Future LSP functionality should build on the same source-level tooling layer rather than on the runtime core.
## Web editor components
The Web playground editor uses CodeMirror 6 with a generated Lezer parser.
@@ -94,6 +112,7 @@ Consumers that need syntax information should use the component that matches the
- Rust execution and embedding: `decodal`
- Browser execution: `decodal-wasm`
- Source formatting and future LSP tooling: `decodal-language-tools`
- Web editor syntax: Lezer / CodeMirror
- General editor syntax: Tree-sitter